HIVE-4080: Add Lead & Lag UDAFs (Harish Butani via Ashutosh Chauhan)

git-svn-id: https://svn.apache.org/repos/asf/hive/branches/ptf-windowing@1451274 13f79535-47bb-0310-9956-ffa450edef68
HIVE-4034

Summary: Made Window specification more flexible to allow syntaxes which are legal in SQL standard.

Test Plan: Added +ve and -ve testcases.

Reviewers: hbutani

Differential Revision: https://reviews.facebook.net/D8973

git-svn-id: https://svn.apache.org/repos/asf/hive/branches/ptf-windowing@1451441 13f79535-47bb-0310-9956-ffa450edef68
Merge remote-tracking branch 'hive/ptf-windowing' into ptf