When a cluster is empty for KMeans, it's better to give it the point from another cluster j that is the furthest one from center j.
Implicit CUDA and OpenCL control for module definition added.

Feature allows to exclude CUDA or OpenCL optimizations at all even CUDA is used
on build. Exclusion of CUDA or OpenCL cut unwanted dependencies.
fix: use "cvAlloc" wrapper function for malloc.
Fixed an issue with weight assignment causing the resulting GMM weights to be unsorted in BackgroundSubtractorMOG2
improved performance of cv::ocl::minMax
changes for GFTT
improved performance of cv::ocl::countNonZero
improved performance of cv::ocl::sum
improved performance of bitwise ops
nonfree perf tests
typos
fix: use "cvAlloc" wrapper function for malloc.
Merge pull request #2475 from ilya-lavrenov:ocl_2.4_fix
missing () on Mat::type()
Viz::setViewerPose() - changed up-vector to down (common for Computer Vision & Odometry)
Merge pull request #2484 from berak:mat_doc_24
Merge pull request #2485 from Nerei:viz_correct_viewer_pose
fixed  h / s ranges in histogram_calculation tutorial

literalinclude

literalinclude, dropped :lines:
OpenCV_MODULES_SUFFIX variable added to OpenCVConfig.cmake to enable custom module configurations.
Merge pull request #2458 from asmorkalov:android_cmake_opencv_modules_suffix