Add a test for Document.doctype.
Merge pull request #1132 from Ms2ger/doctype

Add a test for Document.doctype; r=Manishearth