Implement document.compatMode

Spec:
http://dom.spec.whatwg.org/#dom-document-compatmode

This is a sub-task for #1428.
auto merge of #1599 : brunoabinader/servo/document-compatmode, r=Ms2ger

Spec:
http://dom.spec.whatwg.org/#dom-document-compatmode

This is a sub-task for #1428.