Add documentation for the DOM.
Merge pull request #2931 from Ms2ger/dom-docs

Add documentation for the DOM; r=jdm
Assert that we're handed a DOM global in initialize_global.