Fix caret rect calculations after r180941

Blink r180941 changed FrameSelection to use Caret's invalidation rect
calculation, which was subtly different in that it jumped to the
caret's containing block without adjusting for the possible offsets
involved. This leads to the caret being improperly invalidated in
cases such as an input that scrolls its overflow.

This patch extracts the code from CaretBase::updateCaretRect, which
does do the right adjustment, and reuses it in CaretBase::invalidateLocalCaretRect.

BUG=416534
R=jchaffraix@chromium.org, wangxianzhu@chromium.org

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

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