raft: add tests for maybeappend

like
```
{
lastterm - 1, lastindex - 1, lastindex - 1, nil,
....
}
```