glsl: add pass to convert GLSL IR to SSA form

opt_to_ssa will convert temporaries and local variables to SSA form,
although for now it can't handle array and record dereferences.

v2:
-move class declarations out to a separate header file, move
convert_to_ssa() to the beginning (Paul)
-tons more comments (Paul)
-move some code from ir_ssa_variable_state::stack_push() to
ir_ssa_variable_state::new_var(), add more asserts (Paul)
-fix logic in ir_phi_insertion_visitor::visit(ir_dereference_variable *)
(Paul) and optimize it to bail out early in the case of duplicate phi
nodes
-make the control flow stack be a singly-linked list instead of an
exec_list (Paul)
-reorder and rename things in the rewrite visitors to
make what's happening more obvious
WIP: glsl: fixup ir_reader for SSA

TODO finishme
glsl: add a pass to convert out of SSA form

Right now we are being basically as naive as possible, and inserting
more copies than necessary. It is possible to implement a more
sophisticated algorithm later, although extending the current copy
propagation pass to support loops better and/or relying on backends to
do copy propagation may make this unecessary.
glsl: convert to and from SSA form in the compiler

This patch is mainly for allowing me to test these changes with piglit.
In the future, a do_ssa_optimizations() function will need to be
created and used by this code, as well as all other users of
do_common_optimizations().

Reviewed-by: Paul Berry <stereotype441@gmail.com>