implement reconnection logic + refactoring

Extracts connections into a separate structure that does the lower-level
packet transmission, and notifies the client when it's disconnected.

Client wraps a channel of Connections; this channel constantly has
a Connection sent to it until the connection is dropped. A new connection is
then made, and sent over the channel, repeat.
add Client.Disconnect()