Add Node.prototype.contains; fix Node.prototype.compareDocumentPosition; more.

- Add new level "living" to contain stuff from the WHATWG DOM Living Standard. It is now the default level. Fixes #767.
- Add document position constants to Node constructor.
- Implement Node.prototype.contains.
- Update Node.prototype.compareDocumentPosition to comply to the algorithm in the WHATWG DOM LS. Fixes #777.
- Add ENTITY_REFERENCE_NODE to obsolete node types.
- Fix DocumentType.prototype.parentNode to return the document node, not null. Fixes #778.
- Fix small issues with DOCTYPEs being unnecessarily uppercased, and processing instructions disallowed under HTML doc types (which is apparently an old W3C DOM Level 1 restriction, but is not in the WHATWG DOM LS).