Implement document.characterSet

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