raft: move unstable related function to log_unstable.go

yes. we could simplify some other stuff too. but i will do this in another pr.