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`.