Add Triangle thresholding algorithm

Add Triangle method for automatic threshold computation next to the existing
Otsu's method. Triangle deals better with images whose histogram does not
contain dominant peak.

See paper Zack GW, Rogers WE, Latt SA.: Automatic measurement of sister
chromatid exchange frequency. J Histochem Cytochem. 1977 Jul;25(7):741-53.
Make Otsu and Triangle algorithms mutually exclusive

Make Otsu and Triangle algorithms mutually exclusive in cv::threshold code.

Signed-off-by: Miroslav Benes <mbenes@suse.cz>
Merge pull request #3360 from mirab:threshold_triangle