raft: optimistically increase the next if the follower is already matched

Fix #1731 
/cc @yichengq @bdarnell

This is useful since we want to pipeline the appendEntry requests. Without
enabling optimistic increasing, the second pipelining appendEntry request
will include the entries the first one has already sent out. We decrease
the next directly to match if the leader receives a rejection for a matched
follower. This happens if one pipelining request get lost and following ones
arrives at the follower.
Why go all the way to `match+1` instead of `to`? It's true that one rejection may be followed by another until we get back to `pr.match+1`, but is there a reason to assume that we've lost everything since the last match instead of stepping back one at a time? In any case this is subtle and deserves a comment.