main: Remove unused function _mesa_shader_index_to_type().
glsl: Get rid of hardcoded arrays of shader target names.

We already have a function for converting a shader type index to a
string: _mesa_glsl_shader_target_name().
glsl: Remove extraneous shader_type argument from analyze_clip_usage().

This argument was carrying the name of the shader target (as a
string).  We can get this just as easily by calling
_mesa_glsl_shader_target_name().
mesa: Improve static error checking of arrays sized by MESA_SHADER_TYPES.

This patch replaces the following pattern:

    foo bar[MESA_SHADER_TYPES] = {
       ...
    };

With:

    foo bar[] = {
       ...
    };
    STATIC_ASSERT(Elements(bar) == MESA_SHADER_TYPES);

This way, when a new shader type is added in a future version of Mesa,
we will get a compile error to remind us that the array needs to be
updated.
mesa: Add an assertion to _mesa_program_index_to_target().

Only a Mesa bug could cause this function to be called with an
out-of-range index, so raise an assertion if that ever happens.