Initial query rewrite support.

Currently supports matching columns, literals and count(*) in the selection
and columns in grouping.


I think using an ADT for a return type would be much clearer.

    sealed trait GroupByMatcher
    case object MatchNoGroupBy extends GroupByMatcher
    case object NoMatch extends GroupByMatcher
    case class MatchGroupBy(exprs: Seq[Expr])

Then `mapGroupBy` could just return GroupByMatcher.