Added Windows support: split out platform-specific network connection code; worker pool cleanup in runTunnel is now asynchronous