Remove deprecated call to g_type_init
Drop support for glib < 2.36
Replace deprecated g_format_size_for_display with g_format_size
Replace GtkObject with GObject also for gtk2
Cleanup GTK_CHECK_VERSION and unify where possible

gdk_x11_window_foreign_new_for_display | since 2.24
gdk_window_get_width | since 2.24
gdk_window_get_height | since 2.24
gdk_x11_display_get_xdisplay | since 2.2
gdk_window_get_display | since 2.24
gdk_x11_window_foreign_new_for_display | since 2.24
GDK_WINDOW_XID | since always
GDK_SCREEN_XDISPLAY  | since always