API register_routes() for registering custom paths.

This replaces the existing updateItems() + extension hook in favour of consistency with the register_dataobject() interface.

Note that this will likely be superseded by something to do with the Config API in the future.
Add extension hook points.