Do not cause unnecessary node lists invalidation on id/name attribute change

Do not cause unnecessary node lists invalidation on id/name attribute change.
Invalidation now occurs only if there are node lists with a *valid* id / name
cache.

I see a 12% speed up on Dromaeo's dom-attr test. This patch should fix the
performance regression by r166263, which made getElementsByTagName() return an
HTMLCollection instead of a NodeList. According to the profiler, the
performance impact is mainly due to node lists cache invalidation. This is
because HTMLCollection has an id / name cache, while NodeList doesn't.

This CL also improves the id / name cache API naming on HTMLCollection for
clarity.

R=abarth, adamk
BUG=340325

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

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