IMPALA-1228 Incorrect rewrite of scalar agg subquery

This commit fixes an issue where, for the case of a scalar agg subquery
with count, the zeroifnull fn is applied to the wrong column during
query rewrite.

This commit also fixes IMPALA-1237.

Change-Id: Ic00ae5799d6970171c007e3ed25348d7fc09d825
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4286
Reviewed-by: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Tested-by: jenkins
IMPALA-1247: In a 2-phase agg the 1st phase should output its intermediate tuple.

Change-Id: I8f7ba0551099b6cf524baf6bd6f848d02896418d
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4378
Tested-by: jenkins
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Disable test_fetch_first and test_session_expiration.

This patch disables these two tests to unblocks builds. Tested the custom_cluster tests
locally to confirm that they do indeed get skipped.

Change-Id: Ie6e67daf7e5705c2227e19a079682e87ad35ee6c
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4381
Reviewed-by: Ishaan Joshi <ishaan@cloudera.com>
Tested-by: jenkins