Move common ThreadPool code to shared CoreLib partition. (dotnet/coreclr#22115)
* Move common ThreadPool code to shared CoreLib partition.
* Move numWorkingThreads counting out of shared code.
* Rename ThreadPoolGlobals.vmTpInitialized to threadPoolInitialized.
Remove exception handling from ThreadPoolWorkQueue.Dispatch.
Remove obsolete code from ThreadPoolWorkQueue.Dispatch.
Rename ThreadPool.EnsureVMInitialized to ThreadPool.EnsureInitialized.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a0f81f59a7beb7120d3147c1547ef8ec1f05e0ae