[ios][ios17][text_input]fix text input system highlight in iOS 17 Beta 7 with firstRectForRange (flutter/engine#45303)
Design doc with more details: https://docs.google.com/document/d/1sM3HMv-SQin39yX1aPUU7vtGv7Hcef1Quc3QhRXBl6A/edit?resourcekey=0-SFYD8vmOIkXiXCZvB1Wlcw#heading=h.tul5o3hopauh
Just to be safe, for now we only change for iOS 17. However, the same logic should apply to older iOS as well. So will update in a separate PR.
Basically we were using `firstRectForRange` incorrectly. According to [the API doc](https://developer.apple.com/documentation/uikit/uitextinput/1614570-firstrectforrange), `firstRectForRange` should return **the rect for the queried range, or a subrange through the end of line, if the range encompasses multiple lines**.
For LTR language:
```
0, 1, 2, 3
4, 5, 6, 7
```
Query: `[1, 2, 3, 4]`
Returns the following rect denoted by `[ ]`:
```
0, [1, 2, 3]
4, 5, 6, 7
```
Similarly, for RTL language (Arabic):
```
3, 2, 1, 0
7, 6, 5, 4
```
Query: `[1, 2, 3, 4]`
Returns the following rect denoted by `[ ]`:
```
[3, 2, 1], 0
7, 6, 5, 4
```
*List which issues are fixed by this PR. You must list at least one issue.*
https://github.com/flutter/flutter/issues/131622
*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style