when restart, compact all the log entries before snapshot. Avoid wrong startTerm
delete print
should break instead of return
Merge pull request #99 from coreos/fixSnapshot

Fix snapshot