glsl/loops: replace loop controls with a normative bound.

This patch replaces the ir_loop fields "from", "to", "increment",
"counter", and "cmp" with a single integer ("normative_bound") that
serves the same purpose.

I've used the name "normative_bound" to emphasize the fact that the
back-end is required to emit code to prevent the loop from running
more than normative_bound times.  (By contrast, an "informative" bound
would be a bound that is informational only).
glsl: Remove unused fields iv_scale and biv from loop_variable class.
glsl: Remove unnecessary list walk from loop_control_visitor.

When loop_control_visitor::visit_leave(ir_loop *) is analyzing a loop
terminator that acts on a certain ir_variable, it doesn't need to walk
the list of induction variables to find the loop_variable entry
corresponding to the variable.  It can just look it up in the
loop_variable_state hashtable and verify that the loop_variable entry
represents an induction variable.
glsl/loops: Allocate loop_terminator using new(mem_ctx) syntax.

Patches to follow will introduce code into the loop_terminator
constructor.  Allocating loop_terminator using new(mem_ctx) syntax
will ensure that the constructor runs.
WIP: move some analysis for loop_controls to loop_analysis.
glsl/loops: Simplify loop unrolling logic by breaking into functions.

The old logic of loop_unroll_visitor::visit_leave(ir_loop *) was:

    heuristics to skip unrolling in various circumstances;
    if (loop contains more than one jump)
      return;
    else if (loop contains one jump) {
      if (the jump is an unconditional "break" at the end of the loop) {
        remove the break and set iteration count to 1;
        fall through to simple loop unrolling code;
      } else {
        for (each "if" statement in the loop body)
          see if the jump is a "break" at the end of one of its forks;
        if (the "break" wasn't found)
          return;
        splice the remainder of the loop into the other fork of the "if";
        remove the "break";
        complex loop unrolling code;
        return;
      }
    }
    simple loop unrolling code;
    return;

These tasks have been moved to their own functions:
- search for the jump as a "break" inside an "if" statement
- splice the remainder of the loop into the other fork of the "if"
- simple loop unrolling code
- complex loop unrolling code

And the logic has been flattened to:

    heuristics to skip unrolling in various circumstances;
    if (loop contains more than one jump)
      return;
    if (loop contains no jumps) {
      simple loop unroll;
      return;
    }
    if (the jump is an unconditional "break" at the end of the loop) {
      remove the break;
      simple loop unroll with iteration count of 1;
      return;
    }
    for (each "if" statement in the loop body) {
      if (the jump is a "break" at the end of one of its forks) {
        splice the remainder of the loop into the other fork of the "if";
        remove the "break";
        complex loop unroll;
        return;
      }
    }
glsl/loops: Get rid of loop_variable_state::max_iterations.

This value is now redundant with
loop_variable_state::limiting_terminator->iterations and
ir_loop::normative_bound.
glsl/loops: Stop creating normatively bound loops in loop_controls.

Instead, create informatively bound loops, since these are more likely
to compile into efficient code.

This requires loop_controls to leave the limiting terminator in the
loop.  As a result, when deciding whether to unroll a loop, we have to
account for the fact that the limiting terminator is there, and just
before doing the unrolling, we have to remove it.

This should result in more efficient code generation when a loop with
a known bound is not inlined, since previously, a loop like this:

    for (int i = 0; i < 3; i++) {
      ...computation involving i...;
    }

would get transformed by loop_controls into this (pseudocode):

    int i = 0;
    loop (normative_bound 3) {
      ...computation involving i...;
      i++;
    }

which at code-generation time, would get lowered to:

    int i = 0;
    int j = 0;
    for (int j = 0; j < 3; j++) {
      ..computation involving i...;
      i++;
    }

and the loop would require two registers to hold the loop index
instead of 1.

Now, loop_controls preserves the original structure of the loop, which
is:

    int i = 0;
    loop (informative_bound 3) {
      if (i >= 3)
        break;
      ...computation involving i...;
      i++;
    }

Since no lowering is required for informative bounds in the back-end,
this can get code generated without using up an extra loop index
register.
glsl/loops: Get rid of lower_bounded_loops and ir_loop::normative_bound.