nir: add glsl_channel_type() helper