Persistent rotating logs

Just using maps (no b-trees) for now.

Still need to implement restore-from-disk.
Merge branch 'wip'