glsl: fix potential bug in nir uniform linker
The state value of main_uniform_storage_index will be wrong for add_parameter() when find_and_update_previous_uniform_storage() finds a uniform if there is more than 1 uniform used in multiple shader stages.
The new code is also simpler.