optimize vanishing line updates when going through restrictions and legs aren't styled independently
Description
https://github.com/mapbox/mapbox-navigation-android/issues/6167 describes an issue of using the full extracted route data LRU cache, which key is based on the full hash of the DirectionsRoute. The cache lookup is actually only needed when the legs are styled independently, since we can't use the trim-offset expression for that scenario. This PR addresses the issue for a scenario where independently styled route legs are not used.
There's a huge performance improvement for a route from Munich to Madrid going through restrictions: before

after

We can see a main thread usage by the MapboxRouteLineApi#updateTraveledRouteLine dropping from over 20% to less than 1% on a Samsung S22+.
Codecov Report
Merging #6169 (cbdadf5) into main (9e06a81) will decrease coverage by
0.03%. The diff coverage is0.00%.
@@ Coverage Diff @@
## main #6169 +/- ##
============================================
- Coverage 68.91% 68.88% -0.04%
+ Complexity 4258 4256 -2
============================================
Files 639 639
Lines 25663 25662 -1
Branches 3004 3004
============================================
- Hits 17686 17676 -10
- Misses 6830 6841 +11
+ Partials 1147 1145 -2
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...ation/ui/maps/route/line/api/MapboxRouteLineApi.kt | 82.75% <0.00%> (-1.18%) |
:arrow_down: |
| ...ui/maps/route/line/model/MapboxRouteLineOptions.kt | 82.71% <ø> (ø) |