connection: Set closed state when zk_loop stops

Calling client.stop() for a client does not always set the client state
KeeperState.CLOSED. This can lead into a situation that client keeps
raising SessionExpired even if the client is actually stopped. This in
turn makes for example ChildrenWatch unable to stop, halting the
handler's stop call too while joining the threads.
Merge pull request #174 from nailor/fix-connection-closed-status

connection: Set closed state when zk_loop stops