Connector: first introduction of a connector class, separated from the session manager.

Builds, but not tested yet.