Filter out meaningless text nodes from unit tests

Some unit tests compare an XML snippet before and after the execution of a
set of operations. For this comparison to pass all the text nodes had to
be exactly the same even if they were not contained in an ODF paragraph.

This imposed a limitation on the tests as they could not have any
whitespace between node structures that were compared in the test files.
Having whitespace is useful to format the test XML data so that it is more
human readable/editable.

This commit filters out any text nodes not contained by an ODF paragraph
so that any test comparisons won't be affected by these text nodes.
Merge pull request #799 from satsuper/unittest-node-filtering

Filter out meaningless text nodes from unit tests
Fix PositionIteration bug when first position is a rejected text node
Correct IE detection code for containsNode workaround

Though a tiny code change, this appears to grant a further 20% speed
improvement for position iteration.
Migrate per-node checks out of TextPositionFilter

Moving these checks into a node filter ensures it is only required
once per node, rather than once per node-position.

This results in a 60% improvement in position iteration speed.
Cache commonly used global object variables