Problem: client API is too complex

Solution: merge connect/disconnect methods into constructor and
destructor so they happen automatically. We do this by invoking
the state machine on demand for these two methods, so it can do
the necessary protocol handshaking. Seems to work.