gdk_window_end_paint: Flush destination surface after paint

It seems in cairo 1.14 we need this after having painted an image surface
to a X11 window surface (i.e. with GDK_RENDERING=image).

(cherry picked from commit 90555e06beb929c4491a58b6136aa9f0f8ae1fae)