Nir uniform linker fixes and tidy up
This series fixes some bugs and removes some duplicate code. The new helper function created in the second patch should be used by the spirv path in find_and_update_named_uniform_storage() to fix some bugs, but that is not addressed by this series.