DRY up custom events in app-router
Move makeMatcher and makeVariables out of app-route's public api