Fixes when accessing fgn_maxgen_percent (#25650)
Fixes when accessing fgn_maxgen_percent (#25650)

* Fixes when accessing fgn_maxgen_percent

PR #25350 changed `fgn_maxgen_percent` to be a per-heap property when
`MULTIPLE_HEAPS` is set. A few uses need to be updated.

* In `full_gc_wait`, must re-read `fgn_maxgen_percent` before the
  second test of `maxgen_percent == 0`.
  (Otherwise the second test is statically unreachable.)
* In RegisterForFullGCNotification, must set `fgn_maxgen_percent` when
  `MULTIPLE_HEAPS` is not set
* In CancelFullGCNotification, must set `fgn_maxgen_percent` for each
  heap separately when `MULTIPLE_HEAPS` is set.

Fix dotnet/corefx#39374

* Avoid duplicate code when getting fgn_maxgen_percent twice in full_gc_wait

poizan42/coreclr,cshung/coreclr,poizan42/coreclr,wtgodbe/coreclr,wtgodbe/coreclr,cshung/coreclr,krk/coreclr,cshung/coreclr,wtgodbe/coreclr,krk/coreclr,cshung/coreclr,poizan42/coreclr,krk/coreclr,wtgodbe/coreclr,wtgodbe/coreclr,krk/coreclr,poizan42/coreclr,krk/coreclr,cshung/coreclr,wtgodbe/coreclr,cshung/coreclr,poizan42/coreclr,krk/coreclr,poizan42/coreclr