Extract route application into a method.

This allows subclasses to override how routes are applied to the parent
app. Which is useful if you want to, for example, attach a db connection
pooling middleware on specific resources (e.g., custom Resource
subclasses), or, say, an authentication middleware.
Extract route remapping into _updateBasePath method.

This is in the spirit of Tell, Don't Ask & command/query separation.
Fix resource test indentation.

The second half of the test file had an extra leading space on every
line. No longer.
Allow for configuring which Resource constructor to use.

Now override `app.resource.constructor` or pass `resourceConstructor` in
3rd arg to `app.resource`.