Harmonize LayerTreeHost/LayerTreeHostImpl synchronization steps

Both LayerTreeHost::FinishCommitOnImpl and LayerTreeHostImpl::ActivateSyncTree
follow these rough steps to synchronize with the LayerTreeHostImpl:
1) Update property trees.
2) Update layer properties, possibly with side effects.
3) Push layer tree host properties (e.g., viewport types and page scale factor).

These steps have implicit dependencies: layer property updates may require
property trees, and the viewport layer type update may require layer properties.

Before this patch, LayerTreeHost and LayerTreeHostImpl followed these steps
in different orders. This patch refactors the synchronization code to use
the same ordering, and adds DCHECKs to enforce dependencies.

BUG=693740
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2873313004
Cr-Commit-Position: refs/heads/master@{#472004}
6 files changed