Render on a temporary surface when needed

Some platforms draw directly to the screen, which means that updates
will flicker if we draw multiple layers. Prevent this by first
composing the update on a hidden surface.
diff --git a/vncviewer/Surface.h b/vncviewer/Surface.h
index 02917e3..9b1788a 100644
--- a/vncviewer/Surface.h
+++ b/vncviewer/Surface.h
@@ -42,6 +42,7 @@
   void clear(unsigned char r, unsigned char g, unsigned char b, unsigned char a=255);
 
   void draw(int src_x, int src_y, int x, int y, int w, int h);
+  void draw(Surface* dst, int src_x, int src_y, int x, int y, int w, int h);
 
 protected:
   void alloc();