leader must stop all heartbeat routines before stepdown and truncate its log