Rewrite DomUtils.getNodesInRange to improve performance

By reducing the number of boundaries being checked, iteration performance is boosted quite significantly for text node retrieval.

### 1000page.odt - Bold the current selection
|   | Master (ms) | PR 321 (ms) | PR 321 + 326 (ms)| PR 321 + 326 + 327 (ms)|
|---|------------|------|---|----|
|Chrome|416651|42446|38806|28577|