Fixed small bug and added shutdown to QuorumZab.
Print out number of active threads before/after each test.
Merge pull request #73 from EasonLiao/netty_zab

Fixed small bug and added shutdown to QuorumZab.
Clean up logging.

Some information became redundant since we started using MDC.
Merge pull request #79 from m1ch1/logging

Clean up logging.
netty transport cleanup.

- Remove unused close() method.
- Don't clear the senders map from the shutdown method. Instead, let
  the ErrorHandler do the clean up.
- Don't print stack trace for connection failed error.
- Add a comment and some asserts around handling disconnect.
Merge pull request #81 from m1ch1/netty

netty transport cleanup.
Delete SingleNodeZab.

Now we can use leader-only QuorumZab instead of SingleNodeZab.
Merge pull request #82 from m1ch1/master

Delete SingleNodeZab.
Transport: make the caller acknowledge the onDisconnected event.

Since the onDisconnected callback is invoked from a netty thread,
it's easy for the caller to get reconnected without realizing that
it has been disconnected.

With this patch, the transport stops sending/receiving messages
to/from the destination once the onDisconnected callback is invoked.
To reestablish the connection, the caller must explicitly call the
clear() method.
NettyTransport: remove tie breaker logic.

With this patch, the handshake fails if there is a tie and the caller
gets the onDisconnected event. It's up to the caller to call the
clear() method and re-initiate the handshake, adding some sort of
back-off logic if necessary.
NettyTransport: remove handshake retry logic.
Merge pull request #83 from m1ch1/master

transport cleanup.
Log timeout message and interrupted message in DEBUG level.
Merge pull request #64 from EasonLiao/logging

clean up logging
Batch sync operation.
Merge pull request #75 from EasonLiao/batch_sync

SyncProcessor should batch
Delivers txns before broadcasting phase.
Add random sleep in round robin election.
Merge pull request #80 from EasonLiao/random_sleep

Add radomized sleep to break round-robin loop