Refactor startThreadedConnectLoop
Interrupt current RelayConnection on connect

* Use SocketChannel, which can be interrupted.
* Always interrupt the connector thread on disconnect if it's running.
* Fixes a bug on slow connections, or firewalls that drop packets, where
  an infinite number of connections will be created in the connect loop.
Only connect if network is available