wal: cut(i uint64) -> cut

/cc @philips @jonboulle @unihorn 
when we do a snapshot, we will have an snapshot index. the snapshot index is the index of the last entry that the snapshot has covered. that entry must be committed and saved into wal. when we restart from snapshot, we will load entries from that entry. If we cannot find that entry, then the wal is corrupted.