TextIterator: Enter and exit UA shadow roots for <input> explicitly.

This patch changes the treatment of <input> elements in TextIterator, so it
could enter and exit from shadow roots only when we expect it to do so.

Currently, TextIterator enters a shadow root only when it encounters an <input>
element. It originally used Node::parentOrShadowHostNode() to find a parent of
the current node, which effectively means two different ways of going up
the node hierarchy (just going up by one level and exiting from a shadow root)
were not distinguished in TextIterator's original implementation.

However, it is not desirable to mix up these two cases, since TextIterator may
possibly jump into a tree which it does not intend to enter.

This patch introduces a new iteration phase for visiting user-agent shadow
roots. The user-agent shadow root for a text input is visited before the node
or its child nodes are visited. When TextIterator finishes iterating all nodes
under a shadow root, it goes back to the shadow host.

This patch should not change the behavior. Covered by existing layout tests and
unit tests (TextIteratorTest.*).

BUG=244955

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

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