Handle incrementing commit index when appending non-empty log entries

- Increment commit index if entry before append matches term and
  log length greater than or equal to index