DRILL-18 - fix some query-parser breakage

I've modified grammar of query-parser for functions such as aggregate function, and fixed some casting problem in parser codes. By applying this fix, you can solve the problem that test cases in query-parser can't pass.
 
https://issues.apache.org/jira/browse/DRILL-18