travis: set maximum Java heap size to 2GB.
netty transport: wait for shutdown to complete.
Merge pull request #159 from m1ch1/master

travis: fix out of memory error
set NettyTransportTest.testSend timeout to 10 seconds.
Merge pull request #160 from m1ch1/master

set NettyTransportTest.testSend timeout to 10 seconds.
netty transport test: adjust timeout for some tests.
Merge pull request #162 from m1ch1/master

netty transport test: adjust timeout for some tests.
netty transport: set quiet period to zero.

Disable grace peiod in EventLoopGroup.shutdownGracefully() so that boss
group and worker group get shut down immediately.
Merge pull request #166 from m1ch1/master

netty transport: set quiet period to zero.
Add retry logic for joining.

The joiner might started before the cluster gets started. The joiner will try to
re-join the cluster if it can't connect to the cluster.
Merge pull request #163 from EasonLiao/join_retry

retry join if it fails
Some refactoring to support different elections.

Includes:
1. Move the logic of transport from ParticipantState to MainThread.
2. Define election message.
3. Change the interface of Election.
4. Make Election method configurable.
5. Pass election object to Leader/Follower so they can reply its leader vote.
Workaround on NettyTransport for tie breaking.

Does random wait if the handshakeFailure is caused by tie breaking.
Add FastLeaderElection.