Minor refactor of RenderBlock::hasCaret et al.

Some redundant work was being done during block painting.
This saves about half a percent of recording time on the
befamous example (see crbug.com/364056).

BUG=364056

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

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