Adds basic support for rotation loops with a switch terminator. This mainly involves making sure that multi edges to the exit block are handled correctly.
This does not yet fix https://bugs.llvm.org/show_bug.cgi?id=44461, because we require that there is only a single edge from the original header into the loop, while that case would require handling the multi edge case. That part is blocked on D72519.
Move the new check out to avoid the extra contains() call?