Copied errorCovPre to errorCovPost. This allows the correct behaviour of the uncertainty to grow when there is missing data for each predict step.
Added few opencl optimizations (as Intel platform codepath):

1. HaarDetetctor: repack nodes to reduce memory footprint
2. cornerMinEigVal: 4 ocl kernels are fused into 1 for sobel calculation
try to fix build error
try to made compatible with mac
rename imageproc_sobel2.cl -> imageproc_sobel3.cl for consistency
fix bugs on host and device sides for imgprog_sobel3.cl
Rewrote moments of opencl version.
VideoCapture: copy the captured frame, to avoid dangling Mats

Previously, VideoCapture::retrieve would return a Mat that referenced
the internal IplImage. Since the latter is rewritten every time a
frame is captured, it means that if the user captures two frames in a row,
the first frame would reference nothing. Similar if a user captures a frame,
then destroys the VideoCapture instance.

Note that the other branch of the if isn't affected, since flip allocates
a new Mat.
fixed extrapolation for ocl::cornerMinEigenVal and ocl::cornerHarris; enabled CV_32FC1 for the first function
Fix a typo
fixed a bug when double is not supported.
fixed find package CUDA for cross-compilation

replaced find_host_package with find_package and
set CMAKE_FIND_ROOT_PATH_MODE_LIBRARY to BOTH, because NEVER 
doesn't work for CUDA_CUDA_LIBRARY, which is located in 
/usr/arm-linux-gnueabihf/lib/libcuda.so for ARM
Merge pull request #1713 from pengx17:patch-2
Merge pull request #1675 from krodyush:opencl-optimization
Bug #3276 Java bindings binary compatibility is broken in branch 2.4 fixed.

New version of Java wrappers' generator uses different wrappers for VideoCapture
on Android and desktop to prevent binary compatibility issues.
Merge pull request #1714 from jet47:find-cuda-fix
Fixed building with OpenCL, but without the ocl module.

HAVE_opencv_ocl implies HAVE_OPENCL, so checking for both is not
necessary.
ocl: split: update tests and implementation
Merge pull request #1652 from nghiaho12:kalman
ocl: adjust worksize for filter2D and boxFilter