Merge pull request #41 from justinsb/check_state_transitions

Verify the previous state as part of every state transition
Refactor must-be-leader logic into base state

This is in preparation for other must-be-leader logic
Initial work on re-configuration
Inject ConfigurationState with suitable starting state
Cope with transitional configurations
Cope with empty configurations
First passing test with configuration change

Admittedly with no data!
Force NIO event group to be single threaded

As otherwise thread guarantees aren't enforced?
Turn off snapshots for now (in this branch)
Fix copy-and-paste error
Manage threads using BargeThreadPool

So we can close it cleanly
Add isEmpty function to log

So we know if it's safe to bootstrap, without having to replay
Add STOPPED state to RaftStateContext

And close everything down more cleanly
Particularly on reply, we may not have a future for the operation
Add Follower.toString
Stop leader when Raft is stopped

Otherwise won't stop when have no peers
Wait for log replay to complete before proceeding
Use a single thread for the state machine executor
Add isLeader method
Add note about firing commit more often