nir: Add nir_foreach_shader_in/out_variable helpers