Factor out part of the traversal routine in HTMLCollection.

I would move the filter() call into the traverse function as well, but the
callback can't outlive its stack frame.
Skip the root node in live HTMLCollections.

The root node is never included in the collection, and omitting it here
simplifies and speeds up the filter implementations.
auto merge of #4363 : Ms2ger/servo/collectionfilter, r=Manishearth