Allow individual layers to render their own background color

Instead of relying on a scene-wide background color, all layers can now
have their own background color.
Add a to_js method to the casting trait code in CodegenRust.py
Replace the manual checks and calls to transmute_copy in /layout/wrapper.rs with calls to to_js

Fixes #3616
auto merge of #3672 : mrobinson/servo/background-color, r=zwarich

Instead of relying on a scene-wide background color, all layers can now
have their own background color.
auto merge of #3655 : kaseyc/servo/add_to_js_method, r=jdm

Replace the manual checks and calls to transmute_copy in /layout/wrapper.rs with calls to to_js/

Fixes #3616
Add DOMRefCell<T> for safe borrowing in layout.

This type simply wraps `RefCell<T>` to add the special method,
and introduce the method to return the pointer of the value contained in
itself, for used in layout task.
Use DOMRefCell<T> in Attr.
Use DOMRefCell<T> in Element.
Use DOMRefCell<T> in CharacterData.