Don't compact LOH just because a heap_hard_limit exists
This is based on a perf test with 100% survival in a container, before
and after dotnet/coreclr#22180. GC pause times were greater after that commit.
Debugging showed that the reason was that after, we were always doing
compacting GC, and objects were staying in generation 1 and not making it
to generation 2. The reason was that in the "after" build,
`should_compact_loh()` was always returning true if heap_hard_limit was
set; currently if we do an LOH compaction, we compact all other
generations too. As the comment indicates, we should decide that
automatically, not just set it to true all the time.
Commit migrated from https://github.com/dotnet/coreclr/commit/
cc14e6cecf6984c991fe906c9fe4b327b4f93f96