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
fixed a bug when double is not supported.
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.
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
ocl: adjust worksize for filter2D and boxFilter
changed eps in ocl::GaussianBlur test
Merge pull request #1712 from alalek:ocl_split
Fixed CMake warnings/bugs caused by #1670 and #1714

include() doesn't create a variable scope, so the settings of
CMAKE_MODULE_PATH and CMAKE_FIND_ROOT_PATH_MODE_* were polluting
everything included after OpenCVDetectCUDA.cmake.

Also, FindCUDA includes FindPackageHandleStandardArgs, which includes
CMakeParseArguments, which causes warnings related to policy CMP0017.
Setting it to NEW seems safe enough.
ocl: filter2D: fix processing of kernel with double datatype
fixed ocl::norm (with NORM_RELATIVE specified) when norm(src2) == 0
disabled upload and download perf tests
Merge pull request #1718 from SpecLad:have-opencv-ocl
Merge pull request #1720 from SpecLad:cmp0017
Merge pull request #1715 from asmorkalov:android_java_bincompat_fix
Merge pull request #1717 from alalek:ocl_adjust_worksize
Merge pull request #1719 from ilya-lavrenov:ocl_gaussianBlur
Merge pull request #1721 from alalek:ocl_fix_filter2D_64F_kernel