raft: append entries only if necessary

It is an optimization to handle out-of-ordered msgApp better.

low priority stuff for now
These are hard to visually parse. Can you format them differently or create a simple helper?