Allow passing of functions to url_for. Close #50.