Raise an error when transports are used without connecting (closes #6)

* Move socket related functionality from Transport into a new
  SocketTransport parent class
* Added some simple tests for Transport and SocketTransport