This commit adds a write ahead log to the shard. Entries are cached in memory and periodically flushed back into the index. The WAL and the cache are both partitioned into buckets so that flushing doesn't stop the world as long.