nir: non-ssa shader instruction pass helper
In refactoring some nir-to-tgsi, I got frustrated with typing out the function/block/instruction walking loop yet again and decided to put together a helper. The diffstat is not what I hoped it would be, but using the helper results in automatically preventing a collection of minor bugs, so it seems worth it.