mesa: Clean up nomenclature for pipeline stages.

Previously, we had an enum called gl_shader_type which represented
pipeline stages in the order they occur in the pipeline
(i.e. MESA_SHADER_VERTEX=0, MESA_SHADER_GEOMETRY=1, etc), and several
inconsistently named functions for converting between it and other
representations:

- _mesa_shader_type_to_string: gl_shader_type -> string
- _mesa_shader_type_to_index: GLenum (GL_*_SHADER) -> gl_shader_type
- _mesa_program_target_to_index: GLenum (GL_*_PROGRAM) -> gl_shader_type
- _mesa_shader_enum_to_string: GLenum (GL_*_{SHADER,PROGRAM}) -> string

This patch tries to clean things up so that we use more consistent
terminology: the enum is now called gl_shader_stage (to emphasize that
it is in the order of pipeline stages), and the conversion functions are:

- _mesa_shader_stage_to_string: gl_shader_stage -> string
- _mesa_shader_enum_to_shader_stage: GLenum (GL_*_SHADER) -> gl_shader_stage
- _mesa_program_enum_to_shader_stage: GLenum (GL_*_PROGRAM) -> gl_shader_type
- _mesa_progshader_enum_to_string: GLenum (GL_*_{SHADER,PROGRAM}) -> string

In addition, MESA_SHADER_TYPES has been renamed to MESA_SHADER_STAGES,
for consistency with the new name for the enum.
glsl: Make more use of _mesa_shader_enum_to_shader_stage() function.
mesa: Store gl_shader_stage enum in gl_shader objects.

This reduces confusion since gl_shader::Type is sometimes
GL_SHADER_PROGRAM_MESA but is more frequently
GL_SHADER_{VERTEX,GEOMETRY,FRAGMENT}.  It also has the advantage that
when switching on gl_shader::Stage, the compiler will alert if one of
the possible enum types is unhandled.  Finally, many functions in
src/glsl (especially those dealing with linking) already use
gl_shader_stage to represent pipeline stages; storing a
gl_shader_stage in the gl_shader object avoids the need for a
conversion.
glsl: Change _mesa_glsl_parse_state ctor to use gl_shader_stage enum.
glsl: Make more use of gl_shader_stage enum in link_varyings.cpp.
glsl: Make more use of gl_shader_stage enum in lower_clip_distance.cpp.
glsl: Make more use of gl_shader_stage enum in ir_set_program_inouts.cpp.
mesa: Remove _mesa_progshader_enum_to_string(), which is no longer used.
mesa: Add extension enable flags for ARB_compute_shader.
mesa: Implement MAX_COMPUTE_WORK_GROUP_SIZE constant.
mesa: Add dispatch API stubs for ARB_compute_shader.
mesa: Implement MAX_COMPUTE_WORK_GROUP_INVOCATIONS constant.
WIP: glsl: Add parser support for compute shader layout qualifiers.
glsl: Change some linker loops to use MESA_SHADER_FRAGMENT as a bound.

Linker loops that iterate through all the stages in the pipeline need
to use MESA_SHADER_FRAGMENT as a bound, so that we can add an
additional MESA_SHADER_COMPUTE stage, without it being erroneously
included in the pipeline.
mesa: Add a MESA_SHADER_COMPUTE stage.
i965: Allow ARB_compute_shader to be enabled via env var.

This will allow testing of compute shader functionality before it is
completed.
glsl: Handle compute shader local_size_{x,y,z} declaration.
glsl/linker: Refactor in preparation for adding more shader stages.

Rather than maintain separately named arrays and counts for vertex,
geometry, and fragment shaders, just maintain these as arrays indexed
by the gl_shader_type enum.
mesa: Replace Current{Vertex,Geometry,Fragment}Program with array.

This should make it easier to add additional shader types
(e.g. compute shaders).
WIP: update switch statements etc