Make Filter a class rather than a module

It wasn't very clear that the exports.fields property on the module was
actually being changed by each request. By using a class that state is
clearer represented, as each storage instance has its own filter
instance, so hopefully the logic is a little easier to follow.