Added LeaderElection recipe

- Follows recipe laid out at
http://zookeeper.apache.org/doc/trunk/recipes.html#sc_leaderElection
Merge pull request #7 from carlyeks/leaderElection

Implemented the Leader Election recipe
Merge remote-tracking branch 'upstream/trunk' into trunk
Improved ping time logging

- If ping response time is longer than 200ms then writes warn log.
- Write ping response time debug log only once every 2 minutes.
- Fixed shutdown ZooKeeper timeout bug and other minor multi-threading
issues.