Use new is*Element() helper functions further more in HTML code

Use new is*Element() helpers further more in HTML code. This makes the code
clearer and simpler. Also use the new Traversal<*Element> API when suitable.

R=eseidel, adamk
BUG=346095

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

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