Fold selects when the non-selected elements are undef from shufflevectors

If we have a select whose operands are two shufflevectors and we know the
non-selected elements are undef, replace the instruction with a
shufflevector from the source vectors of the shufflevectors.

Added test cases.

Added fixes suggested by Benjamin Kramer