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
Add state change callback to StateMachine
Delivers from pending txn queue instead of log in CommitProcessor
Merge pull request #78 from EasonLiao/pending_txns

Deliver transactions in initial history before broadcasting phase
Merge pull request #58 from EasonLiao/state_cb

Add zab state callback (LOOKING/LEADING/FOLLOWING)
Avoid sending duplicate COMMIT messages.
Add origin info in deliver callback.
Merge pull request #85 from EasonLiao/pending_txns

ack processor doesn't need to send commit for already committed transactions
Merge pull request #76 from EasonLiao/attach_origin

How does the application identify transactions?
Optimizations on leader election.
Merge pull request #86 from EasonLiao/optimize_election

Optimizations on leader election.