[mono] Introduce MonoMemoryManager to hold memory previously owned by the domain (#20338)
These commits:
* Add the MonoMemoryManager struct
* Create a memory manager in every domain on legacy
* Create a memory manager in every ALC on netcore
* Update callers accessing the fields in the domain directly
* Remove lazy initialization on some of the old domain fields, in the interest in code simplification
* Put the lock protecting the MemoryManager fields inside the struct itself
Everything is still allocated at the domain level, either from the domain or default ALC depending on legacy vs netcore.
This and the follow up PR have potential to expose racy locking logic by not taking the domain lock as frequently, but if that comes up we can just readd the domain lock as needed alongside the memory manager lock.
Co-authored-by: CoffeeFlux <CoffeeFlux@users.noreply.github.com>
19 files changed: