fix(raft/log): truncate file and reset offset correctly

@xiangli-cmu