nextTraversingShadowTree should walk up from a shadow host to its shadow root when the shadow host has no next element.

When walking up from a given node to a shadow host which hosts the shadow root of the given node,
the shadow host is the last element of a tree, ElementTraversal::next will return 0.
However, if the shadow host is still in some shadow tree, we need to walk up from the shadow host
to its shadow root.

BUG=359854
TEST=fast/dom/SelectorAPI/only-shadow-host-in-shadow-tree.html

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

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