Revert "Remove travel_avoid_distance parameters"
This reverts commit 3f3798c98b0a61a54e183c73b56c4e1d94967ba0, adding that parameter back to some functions.
We found that that change introduced g-code changes from detecting it differently. It wasn't just globally seeing if travel_avoid_distance was maxed across all used extruders, so putting that in the lambda function was wrong.
Contributes to issue CURA-4410.