first version of moving KDTree from core to ml
first implementation KNearest wrapper on KDTree
samples: gpu: removed softcascade example

The example in question cannot be compiled anymore as the softcascade
module has been removed in 3858f2291d64652a82fea930ba5c598045633843.
samples: gpu: removed inclusion of non-existent opencv2/contrib/contrib.hpp header, re-introduced TickMeter class in a separate header

This patch removes inclusion of opencv2/contrib/contrib.hpp header,
which does not exist anymore due to removal of opencv_contrib module.

The samples including this header appear to be doing so in order to
use TickMeter class; therefore, the latter is now provided by tick_meter.hpp
header file, located in samples/gpu folder.
samples: gpu: performance: remove inclusion of opencv2/legacy.hpp header

The header is gone now, along with the opencv_legacy module.
samples: gpu: performance: removed FGDStatModel performance comparison test

The FGD background subtraction model was part of opencv_legacy module;
as it is gone now, it makes little sense to benchmark the GPU version,
either, so the whole test is removed.
samples: gpu: super_resolution: disable simple optical flow

The cv::superres::createOptFlow_Simple() function along with the
simple optical flow class implementation is currently commented out
in the superres module's code, so comment it out in the example as well.
samples: gpu: performance: fix include path for opencv_xfeatures2d

As opencv_xfeatures2d is part of opencv-contrib and not opencv repository,
${OpenCV_SOURCE_DIR}/modules/modules/include is not a correct include
path - use ${opencv_xfeatures2d_SOURCE_DIR}/include instead
samples: gpu: performance: BackgroundSubtractorMOG is now part of opencv_bgsegm module
samples: gpu: performance: SURF is now part of opencv_xfeatures2d
initial commit
slight changes, theme become more similar with current
removed kdtree declaration from interface
Added Ptr<T> support to Java wrappers
NEON impl on cv::convertScaleAba CV_32f
Fixed BORDER_REFLECT and BORDER_REFLECT_101 extrapolation for case x > 2*maxV
Added workaround for Nvidia: take into account that 3-channel vector type takes 4*elem_size in local memory.
Changed check to NORM_RELATIVE for OCL.Mat_Scalar_Scale tests
Merge pull request #3181 from akarsakov:ocl_mul_scale_test_fix
Merge pull request #3174 from rokm:samples-fix