Trying to fix race conditions in zkconn.

Also closing the zk connection in the background, as it
seems to hang in some cases.