Bugfix: oof bad width/height in vertical mode

ng_out_of_flow_layout was using a ConstraintSpace whose writing mode was out
out of sync with child.style. The ng_out_of_flow_layout_part fixes this.

While fixing this bug, I mentioned to cbiesinger that ResolveInline/ResolveBlock
precondition that space and style's writing modes match is error prone, and
that we should add a DCHECK.

I added a DCHECK, and this surfaced a ng_block_layout_algo bug: a mismatch 
when margins were computed. This is fixed in ng_block_layout_algorithm.

Also, some C++ tests triggered the DCHECK, fixed them too.

Bug: 740993
Change-Id: I27150f29ed785d1ff8e7f6c9d8b872339aa31c4c
Reviewed-on: https://chromium-review.googlesource.com/583730
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490053}
6 files changed