Added proper testing of the end of quicktime video files.

CvCaptureFile::grabFrame() always returns 1 regardless, which causes
dead loop when relying on the return value of VideoCapture::read().
Removed trailing whitespace in cap_qtkit.mm.
Fixed OpenCV_LIBS when find_package has been used with explicit components.

Fixes <http://answers.opencv.org/question/23997/opencv-247-cmake-includes-all-modules-even-if-i/>.
Merge pull request #1761 from bhuroc:qtkit-video-file-2.4
Fix the Qt sample, broken after #1722.
workaround for AMD bug: UNREACHABLE EXECUTED
Merge pull request #1829 from SpecLad:config-components-libs
Merge pull request #1833 from SpecLad:fix-qt-sample
Merge pull request #1836 from ilya-lavrenov:ocl_norm_workaround