Avoid extra framebuffer update messages

In most cases we will send an update at the end of processing client
messages so these extra calls only slow things down. Server initiated
events still need an explicit call though.
diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx
index 6a3e1c7..619b0a2 100644
--- a/common/rfb/VNCSConnectionST.cxx
+++ b/common/rfb/VNCSConnectionST.cxx
@@ -276,6 +276,7 @@
 {
   try {
     screenLayoutChange(reason);
+    writeFramebufferUpdate();
   } catch(rdr::Exception &e) {
     close(e.str());
   }
@@ -307,6 +308,7 @@
 {
   try {
     setDesktopName(name);
+    writeFramebufferUpdate();
   } catch(rdr::Exception& e) {
     close(e.str());
   }
@@ -317,6 +319,7 @@
 {
   try {
     setCursor();
+    writeFramebufferUpdate();
   } catch(rdr::Exception& e) {
     close(e.str());
   }
@@ -327,6 +330,7 @@
 {
   try {
     setLEDState(state);
+    writeFramebufferUpdate();
   } catch(rdr::Exception& e) {
     close(e.str());
   }
@@ -744,7 +748,6 @@
   if (!layout.validate(fb_width, fb_height)) {
     writer()->writeExtendedDesktopSize(reasonClient, resultInvalid,
                                        fb_width, fb_height, layout);
-    writeFramebufferUpdate();
     return;
   }
 
@@ -762,10 +765,6 @@
         throw Exception("Desktop configured a different screen layout than requested");
     server->notifyScreenLayoutChange(this);
   }
-
-  // but always send back a reply to the requesting client
-  // (do this last as it might throw an exception on socket errors)
-  writeFramebufferUpdate();
 }
 
 void VNCSConnectionST::fence(rdr::U32 flags, unsigned len, const char data[])
@@ -823,7 +822,6 @@
 
   if (enable) {
     requested.clear();
-    writeFramebufferUpdate();
   } else {
     writer()->writeEndOfContinuousUpdates();
   }
@@ -1243,7 +1241,6 @@
 
   writer()->writeExtendedDesktopSize(reason, 0, cp.width, cp.height,
                                      cp.screenLayout);
-  writeFramebufferUpdate();
 }
 
 
@@ -1273,8 +1270,6 @@
       }
     }
   }
-
-  writeFramebufferUpdate();
 }
 
 void VNCSConnectionST::setDesktopName(const char *name)
@@ -1288,8 +1283,6 @@
     fprintf(stderr, "Client does not support desktop rename\n");
     return;
   }
-
-  writeFramebufferUpdate();
 }
 
 void VNCSConnectionST::setLEDState(unsigned int ledstate)
@@ -1299,12 +1292,7 @@
 
   cp.setLEDState(ledstate);
 
-  if (!writer()->writeLEDState()) {
-    // No client support
-    return;
-  }
-
-  writeFramebufferUpdate();
+  writer()->writeLEDState();
 }
 
 void VNCSConnectionST::setSocketTimeouts()