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
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>)
Don't check for EINTR and replace xioctl with ioctl

This should be safe todo unless we are writing a signal handler.
applied patch #2611 that also likely fixes #2505
Extended python bindings to support scalar values and tuples in place of InputArray (i.e. Mat) - ticket #2658. Added tests for #2611, #2505, #2658
Extended python bindings to support scalar values and tuples in place of InputArray (i.e. Mat) - ticket #2658. Added tests for #2611, #2505, #2658
hopefully fixed handling of 'long' Python type in OpenCV bindings (bug #2193). added the corresponding test
Check pointers before using them in var init
Fix mem leak and mismatched new/delete
{calib3d} Fix copy-paste error in conditional
Merge pull request #328 from jet47:new-gpu-fixes