Improve ZooKeeper watch to wait for ZK failover

After receiving ZOO_CONNECTED_STATE, we should wait for ZK master failover, as discussed in #52.