IMPALA-1433: Support min/max for windows rewritten to be unbounded preceding

We currently don't support executing min/max over sliding windows
(i.e. start is not unbounded), but we should support them if we can
re-write the window to be unbounded preceding (i.e. because the end is
unbounded we can flip the window and sort).

Change-Id: I3469e482ab29367748b10ea82a08477bc3388219
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/5036
Reviewed-by: Matthew Jacobs <mj@cloudera.com>
Tested-by: jenkins
(cherry picked from commit 364222574e427fe2ec1a9458ff48fd241e3a9adf)
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/5148