[release/8.0] [mono][metadata] Replace use of mem manager lock with loader lock (#91327)
* [mono][metadata] Replace use of mem manager lock with loader lock
Hash table operations under the mem manager lock could end up taking the loader lock when performing type comparison, in the case where custom modifiers needed to be loaded. Use the loader lock instead to prevent deadlocks.
* [mono][metadata] Use loader lock during generic class hash table lookup
---------
Co-authored-by: Vlad Brezae <brezaevlad@gmail.com>