Add `applyToClient` method for calling ZooKeeper

`applyToClient` allows to call underlying ZooKeeper client while
ensuring that it is active and connected.