Message formats for RPC between nodes.

Taken almost directly from the RAFT paper. I've added some extra sender
ids to messages for debugging purposes.
Mark version as early alpha 0.1
Use the checked in rebar.

Don't really like this convention but it does make it easier to build things.
Initial simplified leader election.

Only works for the initial startup election, and should stabilise on a
single leader where it sits awaiting commands.
Send periodic timeout messages from leader.

Ensures the leader maintains their position and doesn't trigger any
unnecessary re-elections.
Implement get_leader API function for all nodes.

Also fixed a bug where followers weren't saving the leader id after
receiving a heartbeat message.
Cleanup heartbeat timeout message sending.