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
```
If I didn't use intermediate values then I'd have to declare `err`. Also, it feels weird to assign values to an object if there may be an error that occurred.