getTextNodes: walk the tree using TreeWalker
getTextNodes: walk the tree using TreeWalker

The old implementation was really expensive on a range covering many
rows of table. I think it's because an array was being allocated at
every level of the tree, then flattened out into the level above.

Instead here we just do a depth-first search for text nodes and build up
a single array as we go.  In a little benchmark with a range covering
every cell of a 5000×3 table:

* master: 1.57s ±1.14% (6 runs sampled)
* TreeWalker: 17.5ms ±0.74% (72 runs sampled)

tilgovi/simple-xpath-position,Genius/xpath-range,Genius/xpath-range,openannotation/xpath-range