raft: commitIndex=min(leaderCommit, index of last new entry)
raft: add test for maybeappend change
Merge pull request #1203 from coreos/fix_raft

raft: commitIndex=min(leaderCommit, index of last new entry)