Fix various url problems by taking siteUrl into account when getting route urls.

There seem to have been a bunch of complaints about urls recently. This should fix a lot of those issues. Still thinking about how to best handle this long term.

Also, trying to make as much use of path as possible on the client side, because routing won't work correctly if the current domain disagrees with the siteUrl