nir/types: Add a glsl_get_component_slots() utility