Cast highestEnclosingNodeOfType() return value to tighter type

Cast highestEnclosingNodeOfType() return value to tighter type to increase
code readability. This CL also renames the type checking functions passed
to highestEnclosingNodeOfType() to make it clear what type of Node/Element
is returned.

R=leviw@chromium.org

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

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