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.
Fix build warning
Merge pull request #339 from vpisarev:core_fixes
Added a test of CvModelEstimator2::checkSubset(...)
Fixed #2470
Rebase and merge pull request #342 from ilysenkov/bugfix_2470
Add option to control build of applications (feature #2568)
Add -fobjc-exceptions flag to ObjectiveC sources if supported (bug #2657)
Merge pull request #346 from taka-no-me:decouple_V4L2
Merge pull request #357 from taka-no-me:build_opencv_apps
fixed #2580, #2210. some work on #2025.

modified SIFT to 1) double image before finding keypoints, 2) use floating-point internally instead of 16-bit integers, 3) set the keypoint response to the abs(interpolated_DoG_value). step 1) increases the number of detected keypoints significantly and together with 2) and 3) it improves some detection benchmarks. On the other hand, the stability of the small keypoints is lower, so the rotation and scale invariance tests now struggle a bit. In 2.5 need to make this feature optional and add some more intelligence to the algorithm.

added test that finds a planar object using SIFT.
Merge pull request #360 from vpisarev:sift_fixes
Added minimal support for tiff encoder parameters and test for issue #2161
Fix rollover when computing buffer size in tiff decoder (bug #2161)
Fixed color code in cvtColor in "Load, Modify, and Save an Image" tutorial (bug #2739)