glsl: fix indexing order of 2D arrays

My original implementation of 2D arrays switched the vertex and attribute
indices in dereferencing.  This commit fixes that, and as a side effect makes
the code somewhat cleaner.

This could be combined with "glsl: support compilation of geometry shaders
via EXT/ARB_geometry_shader4" to make the patch set cleaner.
glsl_to_tgsi: fix 2D array indexing order

This fixes glsl_to_tgsi in accordance with the changes in the previous patch.

This could be merged into the commit "st/mesa, glsl_to_tgsi: add support for
geometry shaders" to make the patch set cleaner.
glsl: allow interpolation qualifiers in geometry shaders

This patch could be merged with the commit "glsl: support compilation of
geometry shaders via EXT/ARB_geometry_shader4" to make the patch set cleaner.
mesa: fix transform feedback when a geometry shader is active
squash! glsl: fix indexing order of 2D arrays

Provisional fix