Add initial GROUP BY and HAVING support
Make select idempotent

Doing this allows you pass in an existing select statement and
add or replace clauses.
Refactor tests to compose selects