Speed up moving cursor/selection up or down past non-renderered elements.

Skips calling firstPositionInOrBeforeNode when a node doesn't have a
renderer, since there couldn't possibly be a visible position there.
This was particularly wasteful when trying to move the cursor up when at
the beginning of a document, as it did a O(n^2) scan through the document head.

See bug for easy repro steps.

BUG=263499

Review URL: https://chromiumcodereview.appspot.com/20049007

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