[winrt support] Replacing banned APIs Sleep and InitializeCriticalSection

Updated InitializeCriticalSection to InitializeCriticalSectionEx if on a new enough platform that supports.

Replaced Sleep in the yield function to use std::this_thread::yield if targeting the Windows Runtime.