Factor out platform-specific bits from rustrt::thread.

Had to import platfrom-specific stuff differently due to privacy
Factored out platform-specific parts of rustrt::time