Report exceptions to JS when the DOM implementation fails.

As a bonus, adds some debugging statements.
Add test.
Return None from get_graphics_metadata in headless compositor

This fixes servo -z.
Merge pull request #1304 from Ms2ger/exceptions

Report exceptions to JS when the DOM implementation fails.
Merge pull request #1339 from kmcallister/native_graphics_context

Return None from get_graphics_metadata in headless compositor
layout: Change `RenderBox` to an enum and shorten its name in
preparation for removing its `@`-ness.

Also removes a few text copies that were taking place.

This sure does remove a lot of code!
Merge pull request #1327 from pcwalton/enumify-boxes

layout: Change `RenderBox` to an enum and shorten its name in preparation for removing its `@`-ness.