create is_local_url helper
replace existing validators
rename came_from -> ret_url
define c.ret_url in base template

This has the benefit of having the validation in a single place
is_local_url js implementation
split tests
add domain tests
dont allow subdomains if relative urls are enabled
fix js: allow 2 domains
fix validator: check if there is a dot at the end of subdomain
compare c.ret_url to empty string instaed of None

pylons retuerns empty string for non existant attributes
Use AttribSafeContextObj for tests as MockContextObject

This makes the test suite behave more like the actual system
rename ret_url back to came_from

came_from is actually part of repoze.who_friendlyform
Merge pull request #736 from xi/feature-574-ret_url

Fix URL validation