Optimization

A bunch of things in this PR. 

First is the change in how text nodes are selected. It introduce a dependency on using XPath (supported by all pretty much).

Refactor of the contrast test and `aAdjacentWithSameResourceShouldBeCombined` test to make them faster (on big pages documents).