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.
OTSU and Triangle algorithms are mutually exclusive. Can you use something like:
<pre>
int automatic_algo = type & ~CV_THRESH_MASK;
if( automatic_algo == 0 ) // no automatic thresholding
{
}
else if( automatic_algo == CV_THRESH_OTSU )
{
...
}
else if( automatic_algo == CV_THRESH_TRIANGLE )
{
...
}
</pre>

?