First version of the contour fitting

Contour fitting is no good for complex shapes.
This one uses a KNN approach.
Merge branch 'master' of https://github.com/juanprietob/SPINEUtilsCxx