template: add url_for global
fix bug with more than one mount
allow relative url_for