[LayoutNG] Reduce the copy cost of NGExclusionSpace to a tiny amount.

This changes the NGExclusionSpace to use a re-generatable data-structure
called "DerivedGeometry". This contains the representation which is used
to perform queries on the exclusion space.

At a high level exclusion spaces maintain their immutability by copying
each time the information is moved from one algorithm to another (either
up or down the tree).

As exclusions can *only* be added, we exploit this, by making all
exclusion spaces within a "copy-chain" within the same formatting
context share same list of exclusions. If an exclusion gets added
out-of-order e.g. when we are retrying a layout, the exclusions have a
copy-on-write performed.

We also exploit the fact that the expensive re-generatable
data-structure typically only is used by the last exclusion space in the
copy-chain, so within the copy-constructor we always std::move this to
the newly created exclusion space.

Bug: 635619
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I82deed9b6147d1facd4429ba48cb5f0e1763c418
Reviewed-on: https://chromium-review.googlesource.com/1142468
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576544}
3 files changed