Support for plugins to register URL patterns

New pull request for #738. Hopefully this time not in the time of feature freeze.