st/nir: attempt to fix sampler derefs vs index lowering.
Connor say we should only call gl_nir_lower_samplers_as_deref once to get the textures_used value correct. Marek says that it will get called twice for variants which modify the shader after finalising.
Split the code, so that we only call the lower as deref pass once early, but then later call the nir_lower_samplers pass in finialize if the backend wants it.
Modify the two lowering passes (bitmap/drawpixels) to use indices if the backend doesn't request derefs, also modify textures_used directly in these.
This needs to be run on amd and intel hw and maybe some others to make sure it doesn't regress.