Re-land assignLayersToBackings separation from computeCompositingRequirements

The original patch was reverted because of crashes.  It turns out this
patch exposed another issue where collectLayers changed behavior
depending on whether compositing mode was enabled or not. This new
version of assignLayersToBackings patch cleanly avoids the crashes.
The collectLayers issue will be resolved separately in crbug.com/325987

BUG=261605

Review URL: https://codereview.chromium.org/99433005

git-svn-id: svn://svn.chromium.org/blink/trunk@163720 bbb929c8-8fbe-4397-9dbb-9b2b20218538