Do not set a distribution recalc flag when v1 shadow tree is added

After rewriting Shadow DOM distribution engine for v1 [1], we no longer
need to set a distribution recalc flag when a v1 shadow tree is added.

A distribution recalc flag will be set correctly later, if necessary, when a
slot is inserted, removed, or other relevant DOM mutation happens.

Instead of setting recalc flag, host's children need to be lazy reattached in
adding a shadow root, which would be done in resolve assignments if we set a
distribution recalc flag.

This optimization would make loading slightly faster when there are many shadow
trees which will not have a slot because we do not need to traverse down the
trees. In the case of bug 699838, this can make loading 5ms (at most) faster.

[1] https://codereview.chromium.org/1995203002

BUG=712559

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