IMPALA-1065: Running explain on attached (TPC-DS) query throws
IllegalStateExcpetion

This commit resolves IMPALA-1065 where the explain statement of TPC-DS
Q48 resulted in an IllegalStateException due to an overflow in the
cardinality estimation of a cross join operator. The fix is to check if
an overflow has occurred and reset the cardinality estimation to a valid
value.

Change-Id: I0e88fde07e7a5d86819af317e98bab7ac08d5a8a
Reviewed-on: http://gerrit.ent.cloudera.com:8080/3346
Reviewed-by: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Tested-by: jenkins
IMPALA-1066: Build with -no-strict-alias.

Change-Id: I2d9684b0d1f352cba27dff92273d93d60d8435c2
Reviewed-on: http://gerrit.ent.cloudera.com:8080/3336
Reviewed-by: Skye Wanderman-Milne <skye@cloudera.com>
Tested-by: jenkins
Properly account for all finished-with expansions

Change-Id: I86819add942d13fcef3a9dab6977fcabe6cfdb4f
Reviewed-on: http://gerrit.ent.cloudera.com:8080/3220
Reviewed-by: Henry Robinson <henry@cloudera.com>
Tested-by: jenkins
(cherry picked from commit 8185762d8a7231a8b84194339e6927a5fb19c600)
Reviewed-on: http://gerrit.ent.cloudera.com:8080/3364
IMPALA-1066: Fix bad free in Min()/Max() of strings.

Change-Id: If66844a88accdc369458ab92f033eef50775d69e
Reviewed-on: http://gerrit.ent.cloudera.com:8080/3363
Reviewed-by: Skye Wanderman-Milne <skye@cloudera.com>
Tested-by: jenkins