[XLA] Minor cleanups related to multi-output fusion.
- Add some comments about preexisting invariants, and add some CHECKs.
- In the LoopEmitter constructor, materialize the given
ArraySlice<IrArray> to a vector, so we don't rely on the given
ArraySlice having any particular lifetime.
- Add the invariant that the LoopEmitter constructor which takes a
list of IrArrays is only for multi-output fusion. Previously it said:
If you only pass one array, then treat it as regular fusion. But this
results in an LLVM type mismatch, because the given
target_element_generator should be passing a struct with one element.
PiperOrigin-RevId:
184365310