Move RouteList matching to Core module

Move resolveRoute from a module-specific function in FrameworkWebServer
to a public function in Core.

resolveRoute has been rewritten as a recursive function.