cleanQuery method before the middleware is called

The part on the buildQuery method that cleans the querystring from parameters that doesn't belong to the model has been moved to the first position of the middleware. This is to permit modification of the querystring in the middleware functions in case of user scope restrictions or other.

Now, if I want to modify the query in the middleware I can add objects to "req.query".