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

According raft paper:
commitIndex=min(leaderCommit, index of last new entry)

We do not strictly follow the paper. We compare min(leaderCommit, index of last new entry) with current commit index before the set to avoid commit index decrease.