When rendering to PNG, draw to an FBO rather than default framebuffer.

This means that it doesn't matter if the window if partially placed
off screen when reftests run.

Fixes #3470.
Add an extended_deref method to JSRef

The extended_deref method will take a JSRef<'a, T> and produce an &'a T,
in contrast to the standard deref method that takes an &'b JSRef<'a, T>
and produces an &'a T. This is useful when avoiding passing a JSRef by
reference.
Make the AttrHelpers trait use extended_deref
Make the DocumentHelpers trait use extended_deref
style: Tweak the UA style a little bit.
Merge pull request #3499 from pcwalton/ua-fixes

style: Tweak the UA style a little bit.

Reviewed-by: SimonSapin
Merge pull request #3474 from glennw/reftest-fbo

When rendering to PNG, draw to an FBO rather than default framebuffer.

Reviewed-by: mrobinson
Merge pull request #3497 from zwarich/extended-deref

Add an extended_deref method to JSRef

Reviewed-by: Manishearth