nir: Support lowering io of temp variables to scratch
We're using this in the not-yet-merged DXIL OpenCL compiler, since OpenCL requires that addresses of function-local variables can be taken and had arbitrary math done on them, just like other kinds of memory.
/cc @jekstrand @karolherbst