Adds samples for Java and Scala
Added a desktop Java tutorial
fixed tests (call resetDevice, if there was a gpu failure)
fixes for gpu module:

- fixed printCudaDeviceInfo for new CC
- fixed some compilation errors and warnings
- removed unset command from CMake script
- removed unused std imports
optimizations:

- new reduce implementation (with kepler optimizations)
- saturate_cast via asm command
- video SIMD instructions in element operations
- float arithmetics instead of double
- new deviceSupports function
added more types support for gpu separable filters
implemented Luv/Lab <-> RGB conversion
fixed build for CARMA:

- added CMake toolchain file
- added WITH_NVCUVID flag
fixed bugs #1373, #2629, #2719
{highgui} Fix copy-paste error in conditional
Merge branch 'fix_jpg2000' into 2.4
Change Imgproc_ prefix to Photo_ in all accuracy tests of photo module
Add test for issue #2646
Fix integer overflow in NL-Means denoising on white input

Issues #2646
Improve error reporting of JPEG image encoder

OpenCV issue #2604

After this patch applied an attempt to encode empty images produces exception
saying "Raw image encoder error: Empty JPEG image (DNL not supported)"
NetBSD video(4) support, patch 1 of 3

The video(4) driver provides a Video4Linux2 compatible API for
various video peripherals. This patch propagates HAVE_VIDEOIO if
the sys/videoio.h include file is found, which is the signature of
video(4).
NetBSD video(4) support, patch 2 of 3

* Decouple Video4Linux2 support from Video4Linux as existence of
  v4l2 on a system does not imply support for v4l.
* Don't use V4L's struct video_window in V4L2 code.
* Removed __USE_GNU as comment says:
      /* support for MJPEG is only available with libjpeg and gcc,
         because it's use libjepg and fmemopen()
  so replace with test for fmemopen() if found necessary.
NetBSD video(4) support, patch 3 of 3

xioctl() assumes that ioctl takes int request. Cope with
  int ioctl(int d, unsigned long request, ...)
to avoid "invalid argument".
added tests for #1373, #2629, #2719; fixed another bug in determinant(Matx<T,n,n>)
Removed obsolete steps from Windows installation tutorial (bug #2550)