GTK3: Use cairo for drawing

In GTK+ 3, the GDK drawing API (which closely mimics the X drawing API, which is itself modeled after PostScript) has been removed. All drawing in GTK+ 3 is done via cairo.

The GdkGC and GdkImage objects, as well as all the functions using them, are gone. This includes the gdk_draw family of functions like gdk_draw_rectangle() and gdk_draw_drawable(). As GdkGC is roughly equivalent to cairo_t and GdkImage was used for drawing images to GdkWindows, which cairo supports automatically, a transition is usually straightforward.

See https://developer.gnome.org/gtk3/3.9/gtk-migrating-2-to-3.html#id-1.6.3.3.8
Renamed darktable.gui->s to darktable.gui->surface
Merge pull request #310 from LebedevRI/gtk3-03-use-cairo-for-drawing

GTK3: Use cairo for drawing
brush masks: more protection against buffer overflows