changed ThresholdSearch to accept cases where both points on the same side of threshold, also fixed issue in Salt.c where if it quits due to multimode, then thecorrect cv.D is printed in WriteMode