Slightly refactor `url_for` function`
Use Jinja2 streaming
Minor refactoring
Introduce RegexResolver