This commit refactors the raft package to more loosely couple the individual parts. The clock is now broken into
an interface that signals individual actions in the log. The transport has been mocked to allow more control over
the log tests. The handler's log has been mocked to separate its testing from the log itself.
Fails on travis:
UN TestHTTPHandler_HandleHeartbeat
[raft] 2015/01/30 06:52:42 log open: created at /tmp/raft-667391350, with ID 0, term 0, last applied index of 0
[raft] 2015/01/30 06:52:42 log state change: stopped => leader
[raft] 2015/01/30 06:52:42 log initialize: promoted to 'leader' with cluster ID 1, log ID 1, term 1
panic: runtime error: slice bounds out of range
goroutine 32 [running]:
github.com/influxdb/influxdb/raft.func·007(0x0, 0x0)
/home/travis/gopath/src/github.com/influxdb/influxdb/raft/log.go:953 +0x5d5