improved url_for to accept absolute URLs without scheme (closes #502)