nir: Add a helper for general instruction-modifying passes.
The nir_shader_lower_instructions() is really nice, but it's only for SSA operations, and sometimes you want something more general. I've put it in nir_builder.h so it can be inlined and retain the same performance characteristics we're used to in our lowering passes even in the absence of LTO. Reviewed-By:Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <mesa/mesa!6412>