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
```
The change is because we're encoding the timestamp and dimension values as a `[]byte` but we have to convert it to a `string` to be able to use it as a key.