ir_constant: Don't crash on out-of-bounds vector/matrix accesses
Several optimization paths, including constant folding, can lead to accessing an ir_constant vector/matrix with an out of bounds index. The GLSL spec lets us produce "undefined" results, but it does not let us crash.
Similar to 66436405
Closes: #2604 (closed)
CC: mesa-stable@lists.freedesktop.org
Piglit tests: piglit!238 (merged)