SPARK-2226:  transform HAVING clauses with aggregate expressions that aren't in the aggregation list

This change adds an analyzer rule to
  1. find expressions in `HAVING` clause filters that depend on unresolved attributes, 
  2. push these expressions down to the underlying aggregates, and then
  3. project them away above the filter.

It also enables the `HAVING` queries in the Hive compatibility suite.
All `NamedExpression`s have a globally unique id (i.e. the `#number` in the `toString`), so we can just create an Alias with a fixed `name`.  I'd consider naming it something like `havingCondition`.