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.
No; this causes an event to be posted to the script task event queue that could cause the `load` event handler to be invokved. In general, however, we're going to shake out the synchronous parts of Servo after #4057 merges, since that will enable us to hold on to DOM references in asynchronous runnables.