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.
Is there a risk of starvation here? If a new log entry arrives during the MsgApp/MsgAppResp round trip, we will have moved pr.next again. We will be unable to process rejections until there is at least one RTT with no new messages.