Motivation:
The macOS build was broken by #1424, also the Thread.swift file became
a bit of a mess with `#if os(...)/#else` everywhere.
Modifications:
- fix macOS build
- cleanup Thread by splitting it into ThreadPosix & ThreadWindows
Result:
- build working again
- cleaner code