Implement document load tracking.

Improves on the state of the art for #1416. Images, XHR, stylesheets, and scripts now block the document load event from firing, and DOMContentLoaded is dispatched after parsing is complete.
There's a 1:1 relationship between a document and a document loader. I split it out into a separate object because document.rs is big and it was easier to read this way. If a navigation occurs before the `load` event has fired, the loads will continue to be tracked as long as the document is sitting in the bfcache, as the script task event queue will continue receiving network response completion messages.