[Editing] Reorganize code for visual up/down caret movements

PreviousLinePosition() and NextLinePosition() are subroutines of
SelectionModifier and only used there. Hence, this patch moves the two
functions, together with their helper functions, to
selection_modifier_line.cc for better code structure.

This is also preparation for implementing hit test based up and down
caret movements.

Note: One VisibleUnitLineTest tests an exposed subroutine of
PreviousLinePosition, which is inappropriate. This patch changes it
to test up caret movement instead.

Bug: 950728
Change-Id: Ia8a59e8de4bef53c5b4708c59e6995c9d6021687
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1603211
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658668}
8 files changed