Merge 2.4 into master

* #1369 from StevenPuttemans:fix_featuretracker
* #1375 from jet47:gpu-examples-build
* #1459 from asmorkalov:ocv_qt_segflt_fix
* #1516 from akarsakov:new_ffmpeg_build
* #1556 from jet47:fix-bug-3296
* #1587 from alalek:opencl_khronos_headers
* #1613 from alalek:ocl_cvtcolor
* #1620 from SpecLad:record-build-type
* #1626 from ilya-lavrenov:ocl_filters
* #1627 from SpecLad:java-version-no-inline
* #1630 from SpecLad:java-deprecated-assert
* #1632 from alalek:cmake_find_package_build_dir
* #1633 from ilya-lavrenov:ocl_imgproc
* #1634 from alalek:cmake_fix_cuda_linker_deps
* #1635 from alalek:cmake_fix_export_java
* #1636 from ilya-lavrenov:ocl_loop_times
* #1637 from SpecLad:run-py-java-fix
* #1640 from alalek:ocl_fix_exp_test
* #1641 from jet47:imshow-opengl-fix
* #1642 from alalek:cmake_cleanup_targets
* #1644 from ilya-lavrenov:ocl_matrix_operations
* #1645 from ilya-lavrenov:ocl_morph_test_fix
* #1646 from alalek:ocl_fix_msvc11
* #1647 from ilya-lavrenov:ocl_tests_demonstrative
* #1650 from jet47:fix-gpu-bgsegm-sample
* #1651 from ilya-lavrenov:misprint