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
-make sure to delete undefined_var when removing a variable from
consideration for conversion to SSA
-use the correct semantics when generating ir_triop_csel (the condition
must be the size of the inputs)
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.

v2:
-fix potentially confusing comment (Paul)
-don't manually walk through function signatures (Paul)
-fix bug where ssa_owner wasn't getting set to NULL

Reviewed-by: Paul Berry <stereotype441@gmail.com>
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>