Improve CSE.combineIdenticalAlts
This MR improves GHC's combine-identical-alternatives machinery, as suggested in #17901. See the three examples in simplCore/should_compile/T17901
, all of which failed before, but succeed now.
There are three patches. The main payload is in the last one. The previous two are small refactors which I did along the way.