[SPARK-1442] [SQL] window function implement 

aims of step1 ( this pr):
1. support parse sql with complex window define 
2. support most of aggregate-functions with window-spec
3. support window range

aims of step2:
support the rest of un-support features as below:

1. not support with multi-different window partitions ,but support with multi-same window partitions
2. not support with both window partition and group by
3. not support lead, lag (default lead and lag function lookup in HiveFunctionRegistry are GenericUDF, we need GenericUDAF)
4. not support rank, dense_rank
5. not support sql parse with TOK_PTBLFUNCTION

https://issues.apache.org/jira/browse/HIVE-4197
https://issues.apache.org/jira/browse/HIVE-896
Space after //