Optimize (slightly) Document::updateHoverActiveState.

When walking up the chain of potentially effected elements, we can stop
updating hover state as soon as we hit the common ancestor of the newly
hovered element and the previously hovered element. This is a tiny
optimization; it should result in no web-visible change in behavior.

This patch is extracted from the larger mouseenter/mouseleave WebKit
patch[1] submitted by allan.jensen@digia.com (carewolf), reviewed by
David Hyatt.

[1]: http://trac.webkit.org/changeset/149173,

BUG=236215

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

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