nir: Add helper functions to get the instruction that generated a nir_src