[sgen] Fixes for max-heap-size option (mono/mono#18446)
* [sgen] Don't subtract twice the nursery size from max_heap_size
We were subtracting the nursery size when initializing max_heap_size as well as adding it to the allocated_heap when allocating the nursery (alloc_nursery).
* [sgen] Trigger collection if failing to allocate los section
If the memory governor says we are exceeding the max_heap_size by allocating a los section (1MB) for a new los object, attempt to clear some space by triggering a major collection, before completely bailing out.
Commit migrated from https://github.com/mono/mono/commit/
d9db79b4b281afc5064921ff69a4bbbfb2c5f0e1