Refactor the MediaWiki\Rest\Router class to support the concept of modules,
Instead of Router operating on a list of endpoint routes directly, it should operate on a list of modules, and each module then manages a list of routes.
This design allows things like versioning and OpenAPI specs to be implemented on the level of modules. It also allows special modules that handle requests in a way different from patch paths and instantiating Hnadler objects.