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?
Add IPP support in cvtColor function
Fix building the iOS framework after I dropped the VERSION macro.

This version uses CMake to generate Info.plist, which should be more
reliable than the old approach.
Fix a bug of retinaParameters.
When colorMode is set to 0 via Retina::_init method, _retinaParameters's
colorMode variable is not correctly assigned.
Added MOG and MOG2.
Resolved a compiling error under Linux.
Resolved a compiling warning under Windows.
Resolved compiling errors under Linux.
Used perf_precomp.hpp instead of precomp.hpp for test.
macros -> template in IPP support cvtColor
Merge pull request #4 from Itseez/2.4

OpenCV changes
Fix bilateralFilter function
Allow to read PNG image of color_type PNG_COLOR_TYPE_PALETTE with alpha channel
Correct reading PNG color type palette with or without alpha imread flags -1 or 1
Better not using pnginfo.h, using png_get_tRNS instead
using unsigned char instead of uint8_t to compile under windows
Optimized mog and mog2, which have much better performance.
added a test for ocl::norm
fixer error with incorrect condition
Fix a potential bug of ParallelLoopBodyWrapper::operator(Range)
On a 32-bit compiler the calculation may result in data (size_t) overflow when running some paralleled algorithms (which can safely run on a 64-bit compiler).
This bug is found when running OpenCV's Retina tutorial on 32bit VS2010.
removed NPP implementation