tmpvar/jsdom — pull request #840 by ccarpita (2014-07-28 04:41:00+00:00)
Title: Memoize selector methods for considerable read performance gains

This has a notable affect on accessors like ```a.href``` and ```document.links```
which normally walk the whole DOM tree with every access. The memoization caches
the result of queries like ```Node.getElementsByTagName``` and
```Node.querySelectorAll```, and the cache is cleared whenever a lower segment
of the tree is modified.

A write expense will be incurred for memoization, which may be a good tradeoff when considering the gains on the read side:
1. Parent node chain will be traversed on ```_modified```
2. Cache implemented as an array of node references on the calling node, increasing memory usage somewhat.

Addresses issue: GH-839