nir: move gls_type_get_{sampler,image}_count()