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.
Add tests for FastLeaderElection.
Merge pull request #150 from EasonLiao/fast_election

implement a leader election algorithm that finds the best history in a quorum
putting checkstyle configuration outside executions
Merge pull request #174 from fengjingchao/master

putting checkstyle <configuration> outside <executions>
Raise exception if send request in non-broadcasting phase.
Fix the bug of SimpleLog found in jepsen test.
Optimization on FastLeaderElection.

1. Everybody broadcasts its own vote at beginning.
2. Don't clear message queue when participants go back to recovery case
since it might remove election messages.
Move the handling of query leader message after heartbeat check.

Found it by running jepsen test.
Fix the timeout bug in jepsen test.