add basic groups api

Maybe I should explain better. If some posts:
```javascript
{
  "name": "My Group",
  "query": null
}
```
then we'd currently go down the ``.new_smart_group`` path because ``if u'query' in fields`` would be ``True``.