Cursor to be centrally aligned instead of top aligned

Previous code in r178276, only accounted for font height but padding,
border and box height should be also taken into account.

BUG=400522
R=leviw, esprehn
TEST=Various tests that need rebaseline due to code change.

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

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