refactor: code cleanup helper functions of PathOrderOptimizer (CURA-1170)
refactor: code cleanup helper functions of PathOrderOptimizer (CURA-1170)

Ultimaker/CuraEngine,Ultimaker/CuraEngine,alephobjects/CuraEngine,ROBO3D/CuraEngine,totalretribution/CuraEngine,alephobjects/CuraEngine,totalretribution/CuraEngine,ROBO3D/CuraEngine,alephobjects/CuraEngine,ROBO3D/CuraEngine,totalretribution/CuraEngine