Extract batchQuery out into a separate Mongoose plugin (work in progress).