raft: add tests based on section 5.3 in raft paper

for #1408 
hold it for a while and think about it.