mesa: Extend register lifetimes to the end of the largest loop required.
Previously, a register defined at main scope and used in a loop in a
loop could end up getting marked as needed only from the definition
outside of the loops to the end of the inner loop, and we would
cleverly slot in something else in its register in the end of the
outer loop.
Fixes glsl-vs-loop-nested and glsl-fs-loop-nested on glsl2. This
doesn't happen much on master because the original compiler does its
own register allocation, so we find little we can do with linear scan
register (re)allocation.