Make ElementTraversal / NodeTraversal classes for clarity

Make ElementTraversal / NodeTraversal classes for clarity and better
encapsulation. We can now make the templated functions private to make sure
they are not used outside the ElementTraversal / NodeTraversal classes.

R=adamk, eseidel

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

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