Collapse margins before child that uses legacy layout.

Due to the fact that legacy layout doesn't have a notion of MarginStrut
we can't calculate margins correctly for use cases that need to use both
layout engines.

This patch collapses margins and update the parent BFC if the next child
cannot be layed out using LayoutNG(ex. tables).

BUG=635619
TESTS=bunch of fixed tests in CSS2.1 and fast/block test suites

Review-Url: https://codereview.chromium.org/2835233004
Cr-Commit-Position: refs/heads/master@{#466820}
3 files changed