Make SurroundingText work for a Range.

It generalize the algorithm to find the surrounding text to be able to
work with a starting position and an ending position. The goal is to be
able to get the surrounding text arround the current selection.

BUG=330238

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

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