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.