nir/spirv: pull out logic for getting builtin locations
nir/spirv: pull out logic for getting builtin locations

Also add support for more builtins.

metora/MesaGLSLCompiler,metora/MesaGLSLCompiler,metora/MesaGLSLCompiler