Refactor the pooled ArenaAllocator.
The mark/release functionality on `ArenaAllocator` was only being used by the pooled
allocator, and caused some complications in API and implementation. Instead of
providing this functionality on all allocators, refactor this functionality out of
`ArenaAllocator` and into a new subclass, `PooledAllocator`, that provides the
singleton pooled allocator.
A number of additional usability/reliability changes have been enabled as part of this
change:
- `ArenaAllocator::initialize` has been replaced with move assignment
- Asserts have been added on all relevant instance methods to ensure that
`ArenaAllocator` values are initialized before use
- `ArenaAllocator::returnPooledAllocator` has been replaced by making
`ArenaAllocator::destroy` virtual and having `PooledAllocator::destroy` return the
singleton
- The teardown of the pooled allocator is now thread-safe w.r.t. the shutdown of the
arena allocator subsystem
Commit migrated from https://github.com/dotnet/coreclr/commit/
688e7869d18be350f3e32b6a6bd8f347d722b3dd