nir: Add a nir_shader_preserve_all_metadata helper