IRGen crashed in case an enum, which has a 24 bit payload (e.g. three `UInt8`), is used as a payload of another enum, e.g. `Optional`, in a statically initialized global variable.
rdar://112823823
The main change here is in IRGen which needs to be able to emit constant enum values.
Use `emitValueInjection` to create the enum constant.
Usually this method creates code in the current function.
But if all arguments to the enum are constant, the builder never has to emit an instruction.
Instead it can constant fold everything and just returns the final constant.
Also, create statically initialized let-globals as constant global (`constant` instead of `global`).