Record precision of constant variables when needed

Add a traverser that checks precision qualifiers of folded constants and
hoists them to separate precision qualified variables if needed.

Fixes sdk/tests/conformance/glsl/bugs/constant-precision-qualifier.html

TEST=WebGL conformance tests, angle_unittests
BUG=angleproject:817

Change-Id: I1639595e0e49470736be93274f0af07ee732e1fe
Reviewed-on: https://chromium-review.googlesource.com/275095
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/IntermNode.cpp b/src/compiler/translator/IntermNode.cpp
index cb32cd7..815564f 100644
--- a/src/compiler/translator/IntermNode.cpp
+++ b/src/compiler/translator/IntermNode.cpp
@@ -295,6 +295,7 @@
 
 void TIntermAggregate::setPrecisionFromChildren()
 {
+    mGotPrecisionFromChildren = true;
     if (getBasicType() == EbtBool)
     {
         mType.setPrecision(EbpUndefined);