refactor QuerypointBackground.js to become general cross-site XHR solution