Zk crash disconnect

Fix crash on disconnect from ZooKeeper either caused by a restart of the ZK server or by clients being partitioned and losing their connection to the server. This is a temporary fix. A design for a more complete solution will be posted to the wiki.