Dynamic segments

They work pretty much like filters, except the subset of visits happens before dimensions and metrics are calculated (see [Google Analytics Query Explorer](http://ga-dev-tools.appspot.com/explorer/)).

As a consequence, I reused most of the code from filters. There's a bit of duplication where the only different thing is  the change from `filter` to `segment`, but I hope it's okay.