[NFC][LLVM] Code cleanup in bugpoint (#162909)
- Move file local variables and functions out of anonymous namespace and
mark them static.
- Change a few function names to conform to LLVM coding standard
(camelCase).
- Add end of namespace comments for anonymous namespaces.