glsl: Make more use of _mesa_shader_type_to_index() function.
WIP: update switch statements etc