raft: add handleHeartbeat

handleHeartbeat commits to the commit index in the message. It never decreases the
commit index of the raft state machine.
I don't think this change will be a problem, actually, since I haven't really touched the commit logic. I have, however, had to do a number of non-trivial merges for changes around stableTo(). Once I finish up the snapshot stuff I'm currently working on I think my branch will be ready to merge back into the mainline.