Rewrite DomUtils.getNodesInRange to improve performance

By reducing the number of boundaries being checked, iteration performance is boosted quite significantly for text node retrieval.
## Current results
### 1000page.odt - Select all
|   | Master (ms) | PR 327 (ms) |
|---|-----------------|------------------|
|Chrome|10554| 1760|

### 1000page.odt - Bold current selection
|   | Master (ms) | PR 327 (ms) |
|---|-----------------|------------------|
|Chrome|27852| 7043|

### 1000page.odt - Remove current selection
|   | Master (ms) | PR 327 (ms) |
|---|-----------------|------------------|
|Chrome|4553| 1464|

## Historic results
These are from an earlier version of this patch. See above for current comparison vs. current master (866f1bb8c34edc275af9ef8a957487217ecf95ca)
### 1000page.odt - Select all
|   | Master (ms) | PR 321 (ms) | PR 321 + 326 (ms)| PR 321 + 326 + 327 (ms)|
|---|------------|------|---|----|
|Chrome|15925|15948|16206|12712|

### 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|