nir: Add a tex_instr_is_query helper