glsl: Refactor variable declaration handling.
glsl: Refactor variable declaration handling.

Moving the check for an earlier variable declaration helps cleanly
separate out the re-declaration vs. new declaration code a bit.  With
that in place, conflicts between variable names and structure types or
function names aren't caught by the earlier "redeclaration" error
message, so check the return type on glsl_symbol_table::add_variable
and issue an error there.  If one occurs, don't emit the initializer.

Fixes redeclaration-01.vert and redeclaration-09.vert.

Signed-off-by: Ian Romanick <2b237cafb16dc45038e85df6c85e74e6d899eba9@intel.com>

dellis1972/glsl-optimizer,adobe/glsl2agal,dellis1972/glsl-optimizer,tokyovigilante/glsl-optimizer,djreep81/glsl-optimizer,dellis1972/glsl-optimizer,wolf96/glsl-optimizer,jbarczak/glsl-optimizer,benaadams/glsl-optimizer,djreep81/glsl-optimizer,bkaradzic/glsl-optimizer,zz85/glsl-optimizer,mapbox/glsl-optimizer,tokyovigilante/glsl-optimizer,KTXSoftware/glsl2agal,benaadams/glsl-optimizer,bkaradzic/glsl-optimizer,adobe/glsl2agal,benaadams/glsl-optimizer,KTXSoftware/glsl2agal,zz85/glsl-optimizer,metora/MesaGLSLCompiler,zz85/glsl-optimizer,adobe/glsl2agal,zeux/glsl-optimizer,mapbox/glsl-optimizer,mcanthony/glsl-optimizer,dellis1972/glsl-optimizer,mapbox/glsl-optimizer,zeux/glsl-optimizer,KTXSoftware/glsl2agal,mcanthony/glsl-optimizer,bkaradzic/glsl-optimizer,wolf96/glsl-optimizer,KTXSoftware/glsl2agal,wolf96/glsl-optimizer,djreep81/glsl-optimizer,tokyovigilante/glsl-optimizer,wolf96/glsl-optimizer,wolf96/glsl-optimizer,zz85/glsl-optimizer,tokyovigilante/glsl-optimizer,jbarczak/glsl-optimizer,jbarczak/glsl-optimizer,zz85/glsl-optimizer,mcanthony/glsl-optimizer,jbarczak/glsl-optimizer,zeux/glsl-optimizer,benaadams/glsl-optimizer,mapbox/glsl-optimizer,jbarczak/glsl-optimizer,djreep81/glsl-optimizer,metora/MesaGLSLCompiler,benaadams/glsl-optimizer,mcanthony/glsl-optimizer,bkaradzic/glsl-optimizer,djreep81/glsl-optimizer,tokyovigilante/glsl-optimizer,bkaradzic/glsl-optimizer,zeux/glsl-optimizer,adobe/glsl2agal,metora/MesaGLSLCompiler,benaadams/glsl-optimizer,zeux/glsl-optimizer,dellis1972/glsl-optimizer,mapbox/glsl-optimizer,adobe/glsl2agal,mcanthony/glsl-optimizer,zz85/glsl-optimizer,KTXSoftware/glsl2agal