Sort out storage imports

Make it easier to add/remove/change a require statement without having
to change other lines.
Move filter functions into their own module

This allows the filter module to take care of processing docs which come
out of the database, including:

- Handing swapping _id and id fields
- Hide per-document hidden fields
- Hide collection wide hidden fields
- Hide fields which start with an undercore

This means that the hidden fields middleware now simply sets a value on
the filter module, which it then uses when processing the request.