Get closer to the Raft paper.

In particular, the log up to date logic was wrong, and votedFor must be cleared every new term