[Local GC] Move some EE-specific finalize-on-unload logic out of the GC (dotnet/coreclr#10598)
* Move some EE-specific logic to a callback on GCToEEInterface
* Fix the sample
* Consistent style for pointers
* Code review feedback: Move app domain index check into EE callback and make ShouldFinalizeObjectForUnload always return true (due to CoreCLR not having app domains)
* Code review feedback: Fix a comment and add a TODO for bringing these changes to desktop
Commit migrated from https://github.com/dotnet/coreclr/commit/
41617fee235d22d9e6dc1fa31548de63637551fa