IMPALA-1035: Aggregation estimated row size is not correct

This commit fixes IMPALA-1035 where the row size estimate of an agg plan
node is not correct. To fix this issue, we make sure that the stats
associated with the materialized tuple of each Plan node are correctly
populated. This commit also fixes the row size estimation for the Sort
node. The second fix in this commit is wrt
the host memory size estimation of an agg node. Currently, if there is a
having clause, we consider the selectivity of that clause to
estimate the selectivity of the aggregation and its memory requirements.
The fix is to not consider the selectivity of the having clause while
computing the memory size estimate of an agg node. The change in the row
size estimate resulted in different plans for some of the TPC-DS
queries (e.g. use partitioned join instead of broadcast).

Change-Id: I826a6f68517754077cb42393b6b6b72cbd90e76a
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2965
Reviewed-by: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Tested-by: jenkins