[SLP] allow matching integer min/max intrinsics as reduction ops
This version includes extra code and tests to avoid the known
crashing examples as discussed in PR49730.
Original commit message:
As noted in D98152, we need to patch SLP to avoid regressions when
we start canonicalizing to integer min/max intrinsics.
Most of the real work to make this possible was in:
Differential Revision: https://reviews.llvm.org/D98981