These changes introduce Gtk3 support into the highgui module.

A new option WITH_GTK3 has been added to the cmake configure system to enable compilation under Gtk version 3.The flag HAVE_GTK3 is also introduced to select the new Gtk3 code in the source files. (Gtk2 is disbled when Gtk3 is selected).

window_gtk.cpp has been modified to remove obsolete (and deleted from libgtk 3) and introduce new Gtk3 code in its place when compiled for Gtk3.

To compile for Gtk2, disable WITH_GTK3 in cmake. To build for Gtk3 both WITH_GTK and WITH_GTK3 must be selected.
Disable OpenGL when Gtk3 is selected

The OpenGL library is not supported on Gtk3 which uses the cairo
library for rendering. Cairo, in turn uses hardware acceleration when
supported by the underlying system. Some improvement to performance
may be gained by useing the cairo-gl and cairo-glx libraries included
on modern Gtk3 systems.

See the cairo documentation for further information. The following
link may also be of interest.

http://lists.cairographics.org/archives/cairo/2012-October/023609.html
Code cleanup

Remove redundent #if defs from code
Rework gtk3 window resize and draw cleanup

The gtk3 resize functions fail to shrink the window after it has been
resized. This edit changes this and allows the window to be shrunk
back to its original size.

This edit also cleans up the draw/expose functions.
mprove Gtk2/3 options in cmake

Update to cmake files for to include minimum versions, and tidy up gtk operation.

Files updated:
CMakeLists.txt:
  WITH_GTK now uses Gtk3 by default. If not found then Gtk2 is used.
  WITH_GTK_2_X forces Gtk2.x use

cmake/OpenCVFindLibsGUI.cmake
  Updated selection logic to implement methodology described above.
  Implemented warning if Gtk3 not found (and not overridden)
  Implemented error if Gtk does not meet minimum required version

cmake/OpenCVMinDepVersions.cmake
  Added minimum Gtk version of 2.18.0
modified BackgroundSubtractorMOG2::getBackgroundImage so that it can now work with gray-level images.
Merge remote-tracking branch 'upstream/master'
Merge remote-tracking branch 'upstream/master'
Use GTK_VERSION_MAJOR to switch between  GTK+ version two and three
specific code. As a result of this, HAVE_GTK3 no longer needs to be
exposed.

The use of HAVE_GTK, and HAVE_ GTK3 have been changed to mirror the
method used by HAVE_QT and HAVE_QT5.
 On branch gtk3
 Changes to be committed:
        modified:   CMakeLists.txt
        modified:   cmake/OpenCVFindLibsGUI.cmake
        modified:   cmake/templates/cvconfig.h.in
        modified:   modules/highgui/src/window.cpp
        modified:   modules/highgui/src/window_gtk.cpp
Improve GTK+ library selection logic.

The new logic will select GTK+3 by default if WITH_GTK is selected. If
the GTK+3 libraries are not found, then GTK+2 libraries will be selected
if found.
This can be overridden by using WITH_GTK_2_X to force selection of GTK+2
(if found).
KAZE and AKAZE integration initial commit
Prepare KAZE and AKAZE sources for integration
Added KAZE and AKAZE wrappers
Added unit-tests for KAZE and AKAZE features
Clean-up from unused utils.h/utils/cpp
Merge remote-tracking branch 'upstream/master'
Merge branch '2.4' of git://github.com/Itseez/opencv into mog2_bgimg_gray
made a performance improvement.
changed the way the mean value for each pixel is assigned in the output image.
Merge remote-tracking branch 'upstream/master'
Merge remote-tracking branch 'upstream/master' into gtk3

Conflicts:
	CMakeLists.txt