Optimize / clean up hasTagName() call sites

Optimize / clean up hasTagName() call sites so that they call when possible
and in this order:
- HTMLElement::hasTagName(HTMLQualifiedName) / SVGElement::hasTagName(SVGQualifiedName)
- Node::hasTagName(HTMLQualifiedName) / Node::hasTagName(SVGQualifiedName)
- Element::hasTagName(QualifiedName)

Also use isHTML*Element() helpers in a couple of places to improve readability.

This is a follow-up to:
https://src.chromium.org/viewvc/blink?view=rev&revision=178540

R=abarth@chromium.org

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

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