on disk snapshot: work in progress

@jonboulle WAL is the append only log for raft. Without snapshot, it will grow infinitely on disk. 
This creates four problems: 
1. the in mem representation will grow infinitely accordingly if we keeps all the entries in mem(raft leader might need to send old log entries to followers. if we save some to disk then it requires disk io and seek back to wal. we do not want to handle this)

2. restart will take huge amount of time if the log is very long. we need to replay the whole log file.

3. it will take a huge amount of time for a new node to join into the cluster and catch up with the leader. same reason with 2.

4. we might use unlimited amount of disk space.

To solve this problem, we introduce snapshot. After we make a snapshot, we can:
compact the in memory log. we only need to send the follower the snap if they need to catch up. [solved previous 1 and 3]

To solve 2 and 4, we need to `cut` the on disk wal file after a snapshot or every given amount of time. 

So when we have a snapshot ready at index i, we can:

1. safely remove all the wal files that only contains entries with index smaller than i.

2. restart first load the snapshot, and then it only need to load the wal files that contains the entries with index equal or greater than i.

This solves problem 2 and 4.