raft: move unstable related function to log_unstable.go

could we combine stableTo and stableSnapTo into one func?