glsl2: Make the clone() method take a talloc context.

In most cases, we needed to be reparenting the cloned IR to a
different context (for example, to the linked shader instead of the
unlinked shader), or optimization before the reparent would cause
memory usage of the original object to grow and grow.
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp
index 06bea2b..677353e 100644
--- a/src/glsl/ir_constant_expression.cpp
+++ b/src/glsl/ir_constant_expression.cpp
@@ -680,7 +680,10 @@
    if (var->mode == ir_var_uniform)
       return NULL;
 
-   return var->constant_value ? var->constant_value->clone(NULL) : NULL;
+   if (!var->constant_value)
+      return NULL;
+
+   return var->constant_value->clone(talloc_parent(var), NULL);
 }
 
 
@@ -732,7 +735,7 @@
 	 return new(ctx) ir_constant(array, component);
       } else {
 	 const unsigned index = idx->value.u[0];
-	 return array->get_array_element(index)->clone(NULL);
+	 return array->get_array_element(index)->clone(ctx, NULL);
       }
    }
    return NULL;