Rewrite Document creation and reflection.
auto merge of #1191 : Ms2ger/servo/new-document, r=jdm