Unify ways to cache named item in HTMLCollections
Merge http://trac.webkit.org/changeset/149652

--8<--
Refactor the code to share the same infrastructure for both id and name
attributes maps.  Also get rid of shouldRegisterAsNamedItem and
shouldRegisterAsExtraNamedItem from various Element subclasses as these member
functions were duplicating the information in HTMLNameCollection.cpp.
Nevertheless, HTMLImageElement and HTMLObjectElement still update
HTMLDocument's window and document name getter maps when their presence as
named item changes due to an attribute change and children changes
respectively.
-->8--

This CL improve the performance of the global name polluter significantly.
It saves 9.5 seconds on super-slow.html from the linked bug.

R=adamk@chromium.org
BUG=265009

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

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