[NFC][LLVM] Namespace cleanup in MetadataLoader.cpp (#157595)
- Remove forward declaration of `llvm::Argument` and include Argument.h
instead.
- Restrict scope of anonymous namespaces to just class declarations.
- Move local static function out of anonymous namespace.
- Remove a redundant assert when indexing a vector.