Clear G(D|T)K_DISABLE_DEPRECATED build failures

Add a mousepad-gtkcompat.h to add GTK+ 2/3 compatibility code to.
Build with GSEAL_ENABLE defined

Sadly this disables the (semi-buggy but still useful) vertical
selection since I have absolutely no idea how this code works and
it uses some GtkTextView internals. The code is still active if not
building with either GTK3 or GSEAL_ENABLE.

Another thing is extending the hacks related to adding our GtkUiManager
menu as the GtkTextView popup menu. Instead of directly replacing
GtkTextView's internal menu pointer, empty its menu and move our own
items there from the UI manager menu.
Use gdkkeysyms-compat.h on GTK3
Add support for building with GTK3 to build system
Make it compile with GTK3

And various other fixups from previous commits.
Improve GTK2/3-checking in configure.ac.in
Fix the little notebook tab close button

For GTK3 it's basically copied from GeditCloseButton, for GTK2
it's inspired by Geany's notebook.c.
Guard against multiple definitions of G_DISABLE_* macros

Not sure where else they are being defined, but the guards prevent
lots of compiler warnings about re-defining them.
Add wrappers to silence deprecation warnings

Where it's not worth making wrappers (eg. GtkTable, gtkrc) just
disable the GCC warning around that code.

Remove use of GDK_THREADS_ENTER/LEAVE() since uses in idle/timeout
callbacks will occur in the main GUI thread anyway.
Fix expanding checkbox in prefs dialog
Merge branch 'gtk3'

it message to explain why this merge is necessary,