Server clean up.
Refactor server event loop.
gofmt
Pass race detector.
Retrieve peer index and term before verifying server state in heartbeat.
Merge pull request #52 from benbjohnson/50-server-event-loop

Refactor server event loop