Pick centers in KMeans++ with a probability proportional to their distance^2, instead of simple distance, to previous centers
Apply to KMeansIndex KMeanspp the same modification as in HierarchicalClusteringIndex
As some processed distances are already ^2, use template to select whether or not we have to ^2 in KMeanspp
Move templates in dist.h in order to share them between KMeansIndex and HierarchicalClusteringIndex classes.
modified OpenCL SURF API and the tests in 2.4.x to prove that it gives different from CPU results
made SURF_OCL default constructor parameters the same as SURF
modified SURF's performance test to test OpenCL version as well
fixed doc builder warnings; make sure the tests give reasonable results when OpenCL is not available
made the example consistent with the fuction definition and improved doc

made the example consistent with the fuction definition and improved doc
modified BackgroundSubtractorMOG2::getBackgroundImage so that it can now work with gray-level images.
making OCL tests conform to the comon style
disabling failing tests
fixing check_docs2.py issue
fixing conditional compilation
disabling calls to SURF_OCL causing tests failures
Merge pull request #2404 from yashdv:old_basic_structures_doc_fix
splitting plain and OCL tests for SURF.
Merge pull request #2527 from apavlenko:ocl_surf_24
Fixed typos in "matching"
Merge branch '2.4' into fixtypos