dom/document: cleanup and add documentation
spec/dom/document: add some #ready related specs