Organize platform detection code to avoid "Duplication of Roles".

 - Unified similar code in PlatformApis and Libuv.
 - Switched to better platform constants than IsWindows/IsDarwin/...
 - Adopt KestrelEngine to new style.