client: Detect cross-origin requests
client: Handle cross-origin on same domain
xhr: Move cross-origin logic to request
Merge pull request #5 from Attamusc/feature/cross-origin

client: Detect cross-origin requests