Replace req.params with a nested params object

Since express stores the parameters in a hash, parameters with the same
name are overwritten. Because RestBuddy assumes that the parameters
have the same name as the model fields.
Therefore the req params will become a nested object like { users: {
id: 1 }, tasks: { id: 1 } }. The old params object will be assigned to
req.originalParams.
Allow supplying a query function to override the query generated from parsing the route url