Fix edge case of CuraEngine crashing with coasting
Fix edge case of CuraEngine crashing with coasting

This was an edge case where the end of a coasting line ended up exactly on one of the vertices. It can occur more often if the seam ends up near a high-resolution curve, but even then it'll only happen in 0.2% of the models or so, if the segment length is 500 microns. Lucky that we found it!
This fix ensures that the acc_dist_idx_gt_coast_dist variable is one lower (because the for loop is broken off earlier) so that the coasting is applied to just before the vertex rather than to the vertex it's equal to. Coasting should change by up to a micron or two if this edge case is hit. By having that variable be one lower it no longer goes out of range of the accumulated_dist_per_point variable.

Fixes CURA-7588.

Ultimaker/CuraEngine,Ultimaker/CuraEngine