leader must stop all heartbeat routines before stepdown and truncate its log
Merge pull request #167 from xiangli-cmu/dev

more safety