Optimize aggregations over partition keys into simple metadata queries

This optimization rewrites aggregations that are insensitive to the
cardinality of their input (i.e., min, max, distinct aggregates) as
partition metadata queries when the input columns are only partition keys

These are a few examples of queries that benefit:

```sql
SELECT min(key), max(key) FROM t

SELECT DISTINCT key FROM t

SELECT count(DISTINCT key) FROM t

SELECT count(DISTINCT key + 5) FROM t

SELECT count(DISTINCT key) FROM (SELECT key FROM t ORDER BY 1 LIMIT 10);
```
You shouldn't have to generate your own partitions here, assuming that this runs AFTER the predicate pushdown, you can expect that tableScan.getGeneratedPartitions().isPresent() and you can do tableScan.getGeneratedPartitions().get().getPartitions()