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 <ian.d.romanick@intel.com>