Change the ZK connection to be an interface

This facilitates ZooKeeper mocking, while continuing to use the convenience functions around locks etc.