[local gc] refactor apis for threading and suspension to avoid redundant calls in to the runtime (#16765)
* [Local GC] Refactor calls involving thread modes, suspension, and alloc contexts to always operate on current thread
* BOOL -> bool for enable/disable preemptive routines, also remove an unused call to GetThread
* avoid one indirection by having GCToEEInterface::EnablePreemptiveGC return a bool indicating whether the mode was changed
* Callback on IGCHeap for the runtime to notify the GC when it is trapping threads
* use g_fSuspensionPending instead of GCToEEInterface::CatchAtSafePoint for allow_fgc
* Remove CatchAtSafePoint
* Remove GetThread from WaitLongerNoInstru
* code review feedback
* code review feedback
* change BOOL to bool
15 files changed: