added documentation for OpenGL interoperability
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
Added the solution mentioned in patch #3125
adding method dims() to core.Mat
Fixed bug #3101, problem on ellipse2poly function
fixed strings in n1_dims(): n1_dcols() -> n1_dims()