Middle for Mongoose.js that adds pagination, sorting, filtering and projection