Fix NPE when submitting commands to leader node.
Rewind in-memory byte buffers during reads.
Ensure ping messages are not appended to logs.
Ignore empty indices when reading multiple entries from the memory log.
Fix race condition in which the same entry can be applied to the state machine multiple times.
Ensure ping futures are always completed.