Register a router backend when registering routes.

The router-api will reject routes pointing at a non-existent backend.
This therefore creates a backend before creating routes.  This is
consistent with other places in our stack where we're registering
routes.

This PR also includes some refactoring of the existing code and tests around the persistence of the routes etc.
How about just removing lines 25 instead? We know that `base_path` will be an absolute path because that is what our factory generates so no need to change it. Then you don't need to stub the other validation.