[NO ISSUE][COMP] Add sanity checks to the optimizer

Details:
- Introduce sanity checking code in the optimizer that
  runs before and after each rule (when enabled)
- PlanStructureVerifier runs after each fired rule and checks
  that there are no shared references/instances in the plan
- PlanStabilityVerifier runs after each failed rule and checks
  that the rule did not make any changes in the plan
- Add new compiler property "compiler.internal.sanitycheck"
  which controls whether the above sanity checks are
  performed during query compilation.
  It's default value is 'false', so sanity checks are disabled
- Modify testsuite configuration to enable these sanity checks
- Remove ConstantExpression.setValue()
- Add IPlanPrettyPrinter.printExpression()

Change-Id: I4e53f57dd6263d3b292700490d9e57f5cd48cc19
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/7407
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Dmitry Lychagin <dmitry.lychagin@couchbase.com>
Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com>
diff --git a/hyracks-fullstack/algebricks/algebricks-core/pom.xml b/hyracks-fullstack/algebricks/algebricks-core/pom.xml
index 35acfb8..f0972b7 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/pom.xml
+++ b/hyracks-fullstack/algebricks/algebricks-core/pom.xml
@@ -102,5 +102,10 @@
       <groupId>com.fasterxml.jackson.core</groupId>
       <artifactId>jackson-core</artifactId>
     </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>