[mono] Remove domain lock (#50328)
* [mono] Reduce domain lock usage.
* Avoid double locking the loader+domain lock, its not needed.
* Use the mem manager lock and the loader lock in a few places instead of
the domain lock.
* Use lock free code in mono_jit_runtime_invoke ().
* Avoid locking around mono_jit_info_table_add (), it does locking itself.
* [mono] Internalize access to MonoMemoryManager.mp to memory-manager.c.
Also add a separate non-coop lock to protect it, since its accessed
very frequently.
* Use a separate lock for each memory manager.
* Remove the domain lock.
12 files changed: