[VECGEOM-431] Fix to DistToOut() bug for point on surface and direction is almost parallel to surface
Fix was to modify the "on surface" condition from distIn to safetyOut. As suggested, I also introduced some optimization changes as a full distIn calculation is not needed, and a separate invDirection was not saving time.
A similar "point on surface with almost-parallel direction" also affected distanceToIn() function, and I also fixed that, althout in that case it was not possible to eliminate the need for distToOut.
Testing cases added to unit test.