This moves rewriteLoopExitValues from IndVarSimplify to LoopUtils thus making it a generic loop utility function, which should be a non-functional change. This allows to rewrite loop exit values by just calling this function without running the whole IndVarSimplify pass.
For context, we would like to (re)use rewriteLoopExitValues to rematerialize the iteration count in loop exit blocks, which allows us to optimise away better induction variable expressions in hardware-loops.
ReplaceExitValue needn't be a reference.