raft: add tests based on section 5.2 in raft paper

#1408 
if r.stats != StateCandidate {
  t.Fatal(...)
}