Performance issue in extract_contour

The performance of extract_contour is not satisfying and should be improved, especially to deal with large meshes. Related to q4ts#18 (closed).