[WIP] Making Zookeeper integration code more readable.

* Making more variables into `final` so that the state modification is more controlled.
* Adding comments in various places.
* Adding zookeeper bootstrapping to the test suite, and moving the test out of the integration test.