gs: Test redeclaring either gl_PerVertex in or out, and using both.
Test a corner case involving arrays, structs, and interface blocks.

This patch exercises the same corner case as
https://bugs.freedesktop.org/show_bug.cgi?id=70368.
gs: Don't try to use gl_PerVertex when redeclaring fragment shader inputs.

In commit 5b1dff3 (Geometry shaders: Test gl_ClipDistance input (GLSL
1.50)) I accidentally used this syntax to redeclare the
gl_ClipDistance fragment shader input:

    in gl_PerVertex {
      float gl_ClipDistance[8];
    };

This is incorrect--gl_PerVertex is only meaningful in vertex and
geometry shaders.  In fragment shaders gl_ClipDistance isn't in any
interface block.

v2: don't forget the "in" keyword.
Test that in/out qualifiers are required when redeclaring gl_ClipDistance.

Although it is not explicitly stated in the GLSL spec, all examples of
redeclaring built-in in/out variables (such as gl_ClipDistance)
include the "in" or "out" qualifier, so it seems like failure to do so
should cause a compile error.

At present:

- Mesa (as of commit a50c5f8) does not generate an error.

- The NVIDIA proprietary driver for Linux (version 313.18) does not
  generate an error; however, if gl_ClipDistance is redeclared in the
  fragment shader without specifying the "in" keyword, it fails to
  work properly.
Test unsized arrays in interface blocks

These tests verify that unsized arrays appearing inside interface
blocks obey the same rules as unsized arrays appearing outside
interface blocks.  Namely, their size is inferred from the largest
constant integer index used to access them across all compilation
units for the same shader stage, and this inferred size is used to
validate that interface blocks are properly matched between one shader
stage and the next.
!UPSTREAM: gs: Refer to gl_ClipDistance in clip-distance-in-explicit-too-large.geom.

The GLSL 4.10 rules for redeclaration of built-in interface blocks
(which we've chosen to regard as clarifications of GLSL 1.50) heavily
imply that if a given shader doesn't make use of any members of a
built-in interface block, then that shader's declaration of the
built-in interface block (whether implicit or explicit) has no bearing
on linking.  (For instance, only shaders that use a given built-in
interface block need to have matching declarations of it).

It's not clear from the spec how this should affect other errors that
are discovered at link time.  For example, if a shader redeclares
gl_PerVertex with an invalid array size for gl_ClipDistance, but does
not make use of gl_PerVertex, is that an error?

This patch dodges the issue by modifying
clip-distance-in-explicit-too-large.geom to refer to
gl_in[].gl_ClipDistance.

TODO:
- Test on NVIDIA.