Store scrolling root scroll offset explicitly

Instead of sneakily setting the content offset and not the transform on
scrolling roots, let scrolling roots specify their scroll offset
directly and separately. This will also be important when adding proper
scrolling support for iframes.
Give root layers a scrollable policy

This allows iframe layers to move properly when their parents scroll
and is necessary to properly track their masking rects as their
children move and to draw their backgrounds in the proper position.
Properly size root layers

Root layers should be sized to their frame rectangles and the root of
the root layers should track the window size. This is important because
layers need to be properly sized to scroll.
Differentiate clearly how child layers handle scroll events

This allows the scroll handler to know if a child layer didn't handle
an event or the scroll position of the child layer was simply unchanged.
Don't let base layers override root layer size

Base layers (the background layer of each frame) shouldn't override the
size of their root layers. This allows base layers to scroll inside
root layer frames. This does mean that when determining the maximum
scroll position, we need to look at the size of scrolling root children
though.
Compound scrolling offsets when setting content offset

When traversing the layer tree to assign content offset, the new offset
needs to take into account any additional offset from children that are
also scrolling roots. This means that when you scroll a parent frame, it
doesn't override the scroll position of its children, but adds to it.
layout: Float table wrappers directly instead of generating a block
wrapper around them.

Fixes Wikipedia tables leaking out.

Along the way, I refactored tables' width calculation significantly.
This was necessary in order to properly handle floated tables, as some
of the logic had to be ported over from block flows.
Merge pull request #3464 from mrobinson/scroll_offset

Allow iframes to scroll their contents
Merge pull request #3434 from pcwalton/directly-floated-tables

layout: Float table wrappers directly instead of generating a block

Reviewed-by: glennw
Move global_object_for_js_object to global.rs.

This appears to be a more sensible place for it (related to #433).
Regroup uses of JS constants in utils.rs.
Remove unused cx_for_dom_object function.
Add the MPL back to components/plugins/lints.rs

This license was accidentally removed in 5b866e9e.
Merge pull request #3479 from zwarich/lints-license

Add the MPL back to components/plugs/lints.rs; r=Manishearth
Fix trailing whitespace tidy errors
Merge pull request #3477 from Ms2ger/global

Move global_object_for_js_object to global.rs

Reviewed-by: jdm
Merge pull request #3480 from zwarich/trailing-whitespace

Fix trailing whitespace tidy errors

Reviewed-by: larsbergstrom
layout: Enhance the heuristic that guesses the inline size of block
formatting contexts.

The widths of block formatting contexts depend on the floats prior to
them. To avoid a circular dependency between width assignment and height
assignment, we must guess their widths during the assign-widths pass.
The old code simply used the size of the last float, whether
left-floated or right-floated, but this proved insufficient to handle
layouts like those seen on Reddit. The new heuristic keeps track of both
left and right floats independently and sums the width of all left and
right floats to determine the width of a block formatting context. This
is still insufficient to properly lay out Reddit, but the results are
much more acceptable.

A fully correct approach will require that blocks be laid out again if
the initial guess proved to be incorrect. A `TODO` is in the code to
handle this case.