fix cap_qtkit.mm for multithreaded applications

cap_qtkit does not work when the capture is run outside of the main
thread.
If the capture is launched in a separate thread, then [NSRunLoop
currentRunLoop] is not the same as in the main thread, and has no timer.
see
https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/F
oundation/Classes/nsrunloop_Class/Reference/Reference.html
"If no input sources or timers are attached to the run loop, this
method exits immediately"

Using usleep() (which I previously proposed, and was reverted) is not a
good alternative, because it may block the GUI.

Here is the new proposed solution:
- create a dummy timer so that runUntilDate does not exit immediately
- simplify the loop by using runUntilDate instead of runMode:beforeDate
- fix potential memory leaks (pointed out by Xcode's static analysis)
- fix init to follow Objective-C guidelines
- fax warnings about conversions from size_t to int
fix signedness error

OpenCV's automatic builds don't care if you store an unsigned int into
an int, but they don't want you to compare signed with unsigned. Does
that make sense?
Added a new tutorial "Using OpenCV Java with Eclipse". Removed information related to Eclipse from "Desktop Java" tutorial.
Added fix in CMakeLists.txt for contrib module.
Native camera libraries updated.

Android 4.3 support added;
ANY camera index support fixed;
applyProperties now uses camera->reconnect() instead close/connect for Android 4.x.
(cherry picked from commit fff91eef0bd301e791173259ccf884c23397c956)
New Tegra detector with Android 4.3 support added. Manager version++.
(cherry picked from commit aa00b5a0ab3d7289af8ab2006f8521fd3ed17e92)

Conflicts:

	platforms/android/service/engine/jni/BinderComponent/TegraDetector.cpp
OpenCV version++. Current OpenCv version 2.4.6.2
fix for bug #3219 (undefined reference in GPU samples)
Updated with comments of speclad
Bug #1890 Opencv 2.4.0 with QT 4.7.4 and cvcreatebutton exception fixed.

QVector range check exception fixed.
fixed ocl::oclMat::setTo for 2-channel images
Fix a memory leak in CvNormalBayesClassifier::train()
cmake: fixed incorrect usage of add_definitions() on Linux
Added knearest neighbor of OpenCL version.
It includes the accuracy/performance test and the implementation of KNN.
Added knearest neighbor of OpenCL version.
It includes the accuracy/performance test and the implementation of KNN.
Merge pull request #1483 from kecsap:nbayes
Removed unused constructor.
Merge pull request #1487 from alalek:fix_add_definitions
Merge pull request #1482 from ilya-lavrenov:ocl_setTO
Merge pull request #1489 from melody-rain:2_4_knearest_neighbor