Clean up qualification order checks

Move determining whether qualification order checks are relaxed to
QualifierTypes.cpp. The ParseContext only needs to construct
TTypeQualifierBuilder with the shader version as a parameter, and it
will make the decision based on that. ParseContext still passes
diagnostics to the TTypeQualifierBuilder functions that return
variable qualification to make it more explicit when errors are
generated.

Also encapsulate looking for symbols in the AST inside
compiler_test.cpp.

BUG=angleproject:1442
TEST=angle_unittests

Change-Id: I4190e6a680ace0cc0568a517e86353a95cc63c08
Reviewed-on: https://chromium-review.googlesource.com/380556
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/compiler/translator/ParseContext.h b/src/compiler/translator/ParseContext.h
index aa8619c..9db6a66 100644
--- a/src/compiler/translator/ParseContext.h
+++ b/src/compiler/translator/ParseContext.h
@@ -327,6 +327,7 @@
                                           const TSourceLoc &qualifierTypeLine,
                                           int intValue,
                                           const TSourceLoc &intValueLine);
+    TTypeQualifierBuilder *createTypeQualifierBuilder(const TSourceLoc &loc);
     TLayoutQualifier joinLayoutQualifiers(TLayoutQualifier leftQualifier,
                                           TLayoutQualifier rightQualifier,
                                           const TSourceLoc &rightQualifierLocation);