This allows customizing the headers of the request. It has the same
semantics as `navigator.sendBeacon` and it's the recommended alternative
to `sendBeacon` for customizing the request:
https://www.w3.org/TR/beacon/#introduction
This commit also fixes `settings.requestHandler` not being called when
using `settings.sendBeaconCommit`.
- Adds 2 new settings to BaseAPI, xhrWithCredentials and xhrHeaders.
- xhrWithCredentials is set to false default to make this a non breaking change but will allow people to set this to try to send Domain Cookies
- xhrHeaders gives the ability to add custom headers to the XHR Request to the LMS, allowing additional information to be sent