added url_for template helper.

the function calls in templates are leaking memory. should be fixed soon. :(