Refactor _getMappingsForCharRange()

This function has been refactored for collecting the possible
text nodes which can be part of the selection.

Currently there are two methods for it.
- The getTextNodesLinear() which is the original plain simple method
- The getTextNodesBinary() this uses binary search to look for the
two text nodes which are the borders of selections and selects
all between them