Final set of performance improvements for minimum_distance function for curves.
Code cleanup. Removed unused code.
Fixed constants test error for gcc 4.8.