Fix Running .NET Core Under Windows App Compat Shim (dotnet/coreclr#26605)
* Fix Running .NET Core Under Winndows App Compat Shim
.NET Core uses Windows features called sort handles for perf reason to speed up the collation operations (e.g. string comparisons). When enabling Windows app compat shim (e.g. Windows 7 compatibility mode), the calls uses sort handles will fail which cause all collation operations to fail.
The fix here is to detect if the sort handles work before using it to ensure successful run.
* Address the feedback
* More feedback addressing
Commit migrated from https://github.com/dotnet/coreclr/commit/
0f1314bdca91add2b4e9dbc95ec687dab638e1a0