Fixes#1133, fixes#1134.
This is a rebase and clean-up of these two pull requests that have been reviewed individually. Additionally, 5c59699 disables parsing of `display: list-item` which is not supported yet and may have been the cause of the hangs when testing #1134.
**This build is expected to fail** at first, because `test_img_width_height` is broken on `master`. It's the simplest way I know to check that with this change, buildbot will indeed catch failing content tests.
After that happens I'll push the commits to fix `test_img_width_height` and request a re-review.
The bit I don't like about these changes is that I ended up hiding the document node from the CSS selecting/matching code, so it continues thinking of the document's first child as the root. When I tried to send the full tree including the document node to layout, the layout code refused to create any child flows. When I sent the document's first child without hiding the document, it saw inherited values for properties like font-family, and later tried to treat the document node as an Element when searching for named nodes.
This broke in ab0d620 and in trying to fix it, it's become clear that I don't understand the intended behavior of `getClientRects()`. In fact I only see one rect in Firefox even when all three `<div>`s have drawn borders, which confuses me compared to [the spec](http://www.w3.org/TR/cssom-view/#the-getclientrects-and-getboundingclientrect-methods). Let's remove the test for now and someone who understands what's going on (which could be future me!) will re-add it.
I don't think it's useful to keep those lying around, in particular because we should never even implement some of those (`mozHidden`, `mozVisibilityState`, …)
This broke in ab0d620 and in trying to fix it, it's become clear that I don't
understand the intended behavior of getClientRects(). In fact I only see one
rect in Firefox even when all three <div>s have drawn borders, which confuses
me. Let's remove the test for now and someone who understands what's going on
(which could be future me!) will re-add it.