glsl: Generalize processing of variable redeclarations.

This patch modifies the get_variable_being_redeclared() function so
that it no longer relies on the ast_declaration for the variable being
redeclared.  In future patches, this will allow
get_variable_being_redeclared() to be used for processing
redeclarations of the built-in gl_PerVertex interface block.
glsl: Support redeclaration of VS and GS gl_PerVertex output.

Fixes piglit test
spec/glsl-1.50/execution/redeclare-pervertex-subset-vs.