base: initialize the main thread handle properly
base: initialize the main thread handle properly

On Windows, there is no `pthread_self`.  Duplicate and leak the handle
for the main thread.  Since this is a global singleton, the overhead
should be fine.

e78l/swift-corelibs-foundation,JGiola/swift-corelibs-foundation,apple/swift-corelibs-foundation,apple/swift-corelibs-foundation,JGiola/swift-corelibs-foundation,parkera/swift-corelibs-foundation,apple/swift-corelibs-foundation,parkera/swift-corelibs-foundation,apple/swift-corelibs-foundation,parkera/swift-corelibs-foundation,e78l/swift-corelibs-foundation,apple/swift-corelibs-foundation,JGiola/swift-corelibs-foundation,parkera/swift-corelibs-foundation,parkera/swift-corelibs-foundation,JGiola/swift-corelibs-foundation,e78l/swift-corelibs-foundation,JGiola/swift-corelibs-foundation,e78l/swift-corelibs-foundation,e78l/swift-corelibs-foundation