Add query rewrite support for where, group by and nested expressions.

For example, if you want a rollup for only the current month of data to let you do more complex queries against the current month via full table scans on it.  Essentially a poor man's partitioning.  Not the way you _want_ to implement that, but a possible option if push comes to shove.