Implement document.compatMode

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

This is a sub-task for #1428.
Failed to link -lpng while make reftest is fixed.
Multiple Compositor Layers

  This is not anywhere near complete. This commit is purely for
  review/feedback purposes in order to nail down implementation
  details and technical concerns.

  Creates multiple compositor layers, and buffers almost make it
  into the layers.
Fixed positioning issue.

  Compositor layers now display, but with a big white box around them
  that covers things behind it :/