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.
Use last resort font when only there is no font in font group.
There is a little bit of performance gain of layout.
removing unnecessary to_owned
Merge pull request #1341 from deokjinkim/layout_font_optimize

Use last resort font when only there is no font in font group.
Merge pull request #1343 from ryanhc/removing_to_owned

removing unnecessary to_owned
Remove unnecessary @mut from LineboxScanner
Convert LayoutContext.image_cache from @mut to MutexArc

LocalImageCache isn't Freeze so we have to use unsafe_access,
which exists for MutexArc and not RWArc.
Merge pull request #1344 from kmcallister/layout-boxes

Remove @mut from LineboxScanner and image caching