ASTERIXDB-1226: implement SQL++ core group-by semantics and syntatic sugars.

-Implmented SQL++ core group-by semantics;
-Implemented SQL++ group-by syntatic sugars for standard SQL;
-Added test cases;
-Fixed column alias rewriter;
-Fixed the variable scoping for joins.

Change-Id: I6e5477d5bf80114cfff49c8ecb163849ee55eba6
Reviewed-on: https://asterix-gerrit.ics.uci.edu/752
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>
diff --git a/asterix-lang-sqlpp/src/main/javacc/SQLPP.html b/asterix-lang-sqlpp/src/main/javacc/SQLPP.html
index ebe7926..bbecc21 100644
--- a/asterix-lang-sqlpp/src/main/javacc/SQLPP.html
+++ b/asterix-lang-sqlpp/src/main/javacc/SQLPP.html
@@ -863,7 +863,7 @@
 <TR>
 <TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod93">GroupbyClause</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE>&lt;GROUP&gt; &lt;BY&gt; ( <A HREF="#prod43">Expression</A> ( ( &lt;AS&gt; )? <A HREF="#prod49">Variable</A> )? ( &lt;COMMA&gt; <A HREF="#prod43">Expression</A> ( ( &lt;AS&gt; )? <A HREF="#prod49">Variable</A> )? )* )</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>&lt;GROUP&gt; &lt;BY&gt; ( <A HREF="#prod43">Expression</A> ( ( &lt;AS&gt; )? <A HREF="#prod49">Variable</A> )? ( &lt;COMMA&gt; <A HREF="#prod43">Expression</A> ( ( &lt;AS&gt; )? <A HREF="#prod49">Variable</A> )? )* ) ( &lt;GROUP&gt; &lt;AS&gt; <A HREF="#prod49">Variable</A> ( &lt;LEFTPAREN&gt; <A HREF="#prod75">VariableRef</A> &lt;AS&gt; <A HREF="#prod18">Identifier</A> ( &lt;COMMA&gt; <A HREF="#prod75">VariableRef</A> &lt;AS&gt; <A HREF="#prod18">Identifier</A> )* &lt;RIGHTPAREN&gt; )? )?</TD>
 </TR>
 <TR>
 <TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod94">HavingClause</A></TD>