Add group by support for tags.

## Overview

This commit adds GROUP BY support for tags. Previously only the interval could be grouped by.


## Queries

This query is now supported:

```
SELECT sum(value)
FROM cpu
WHERE time >= now() - 3h
GROUP BY time(1h), host
```
I wanted a consistent way to sort rows so that tests would be consistent. There's not a real sort order since the `Tags` are a map and don't have ordered keys. I suppose I could sort the rows by the dimensions on the query but that gets more complicated. I can change that later but the main purpose of the sort was consistent ordering for tests.