Rewrite SQL++ functions.

-Maps SQL function names to internal names.
-Allows SQL++ builtin functions to be case-insensitive.
-Rewrites SQL-92 global aggregates.
-Refactors SQL++ AST visitors.
-Cleans up semantics of COLL_AGG and SQL-92 AGG.

Change-Id: Idb5a7c6780669b27065b0928bec7e4700cfb53a9
Reviewed-on: https://asterix-gerrit.ics.uci.edu/759
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>
diff --git a/asterix-app/src/test/resources/optimizerts/queries_sqlpp/fj-phase1.sqlpp b/asterix-app/src/test/resources/optimizerts/queries_sqlpp/fj-phase1.sqlpp
index 4e274e5..f1d5086 100644
--- a/asterix-app/src/test/resources/optimizerts/queries_sqlpp/fj-phase1.sqlpp
+++ b/asterix-app/src/test/resources/optimizerts/queries_sqlpp/fj-phase1.sqlpp
@@ -56,7 +56,7 @@
           from  Users as user,
                 user.lottery_numbers as lottery_number
           group by lottery_number as item
-          with  count as rares03.count(user)
+          with  count as count(user)
           order by count desc
       ) as token at i
       where (lottery_number = token)