Ajax: use anchor tag for parsing urls

This PR changes the Ajax URL parsing from using a regex to using an anchor tag. This should be simpler and more reliable.

Fixes https://github.com/jquery/jquery/issues/1875
/cc @dmethvin
I think `urlOrigin` can be dropped as well, since it's value is only accessed once, right after it is defined.