Implement most of the features of TextField

I take it this is supposed to check if the range [`beginIndex`, `endIndex`] overlaps with the current run.
```                                
               012345678901234567890123456789012
Runs       ==[===a===][===b===][======c======]
Range 0: |-----| 
Range 1:        |-----| 
Range 2:   |-------------------| 

Range 0 overlaps A: Because of the second or condition.
Range 1 overlaps B: Because of both or conditions.
Range 2 does not overlap B: Both conditions fail, is this supposed to be the case? 
 ```
If we had some helper functions like `segmentsOverlaps(aMin, aMax, bMin, bMax)` it would be easier to reason about these kinds of operations.