Use val instead of var if that is not variable.
Remove meaningless type casting.
Remove meaningless semicolon.
Remove unused imports.
Remove unused variable.
Use simple code as possible.
Implement standalone mode for test.

There is no need to launch zookeepr for test. And restarting zookeeper
server for every test makes test slow.

This patch implements the option to launch standalone mode. The
standalone mode will not make routing table so it doesn't need to launch
zookeeper.