feat: raft log compaction
This patch is extracted from !478 (merged), but refactored significantly.
- Implement the raft log compaction
- Refine and document the behavior of
RaftSpaceAccess::entries()raft::Storage::entries()raft::Storage::term()raft::Storage::first_index()raft::Storage::last_index()
- Test it intensively.
- Assert that
persist_*functions are invoked in a transaction