Query middleware: `find` and `findOne` hooks

See #2138