Move aggregation preparation to a rewriter

Moves the isolating of aggregations into
one of the new rewriters working directly
on the AST.
Cleaned up imports
Merge pull request #2193 from systay/aggregation-isolation

Move another rewriter to the new AST
Remove Function*WithImplicit1

The idea was that it would allow us to nicely use function composition
with implicits parameters. In practice, because the class is not a function
type, you could not use the function sugar syntax to build those objects
which made the resulting code cumbersome in some cases.
Rename SimpleLogicalPlanner to GreedyOperatorOrderingPlanner