raftLog: enhance check in compact

@xiangli-cmu @bmizerany 
i >  l.committed?