mesa: Rewrite the way uniforms are tracked and handled

Switch all of the code in ir_to_mesa, st_glsl_to_tgsi, glUniform*,
glGetUniform, glGetUniformLocation, and glGetActiveUniforms to use the
gl_uniform_storage structures in the gl_shader_program.

A couple of notes:

 * Like most rewrite-the-world patches, this should be reviewed by
   applying the patch and examining the modified functions.

 * This leaves a lot of dead code around in linker.cpp and
   uniform_query.cpp.  This will be deleted in the next patches.

v2: Update the comment block (previously a FINISHME) in _mesa_uniform
about generating GL_INVALID_VALUE when an out-of-range sampler index
is specified.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 32f4ca7..ae583a3 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -1858,7 +1858,7 @@
    }
 
    update_array_sizes(prog);
-   assign_uniform_locations(prog);
+   link_assign_uniform_locations(prog);
 
    /* OpenGL ES requires that a vertex shader and a fragment shader both be
     * present in a linked program.  By checking for use of shading language