nir: Move a hot range-analysis assert loop to a unit test.
This change results in debugoptimized freedreno shader-db runtime reducing 19.9342% +/- 1.15989% (n=4). We use debugoptimized builds in CI, so making sure that they're not too expensive results in the project being able to spend more time doing useful testing.
Related to #2046 (closed)