Improve FPS on black and white Ximea cameras
Remove HAVE_CVCONFIG_H - it's always defined.
Deleted a bunch of unused configuration macros.
Removed a few more unused configuration macros.

I've left HAVE_LIBPTHREAD as a CMake variable, since TBB's build depends on it.

Some macros in internal.hpp depended on HAVE_ALLOCA_H, but they were, in turn,
unused, so I've just deleted them all.
Refactored detecting several Apple-related technologies.

Now the HAVE_* macros are set using cvconfig.h. Previously most
of them already were there, but were always undefined. One,
HAVE_COCOA, I had to add.

This also makes the CMake code more consistent; now, WITH_* variables
are always checked in cmake/*, while HAVE_* variables are checked in
modules/highgui/CMakeLists.txt.
Refactored image format library finding logic.

Now the HAVE_* macros are set in cvconfig.h. Most of them already were there,
but were nonfunctional.
Removed unused NEW_FFMPEG macro.
Removed the HAVE_LRINT macro, which is never set.
Removed unused PACKAGE_* macros.
Removed useless VERSION macro (and CMake variable)
Sorted cvconfig.h.cmake in alphabetical order.
fix hog mismatch on cpu ocl
Add ocl::gftt performance test.
Fix compilation error on Mac
a little simplify to pyrlk kernel
Fixed bug 3166 - added paper reference to stardetector code
Adapted the reference underscore to link properly
removed multiplied code for exception handling
refactored throwJavaException() and removed useless returns
compute method for Feature2D