Some initial work on a query builder that works with Couch
Treat the document key as an array and push values on to it, so we can use grouping