Limit maximum lossless refresh CPU usage

If we have plenty of bandwidth then CPU might be the limiting resource.
Unfortunately we don't have a good number for that limit, so add a
conservative hard coded value.
diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx
index 01e86c1..f1591f4 100644
--- a/common/rfb/VNCSConnectionST.cxx
+++ b/common/rfb/VNCSConnectionST.cxx
@@ -1094,11 +1094,16 @@
     //        afford a larger update size
     nextUpdate = server->msToNextUpdate();
     if (nextUpdate > 0) {
-      size_t maxUpdateSize;
+      size_t bandwidth, maxUpdateSize;
 
       // FIXME: Bandwidth estimation without congestion control
-      maxUpdateSize = congestion.getBandwidth() * nextUpdate / 1000;
+      bandwidth = congestion.getBandwidth();
 
+      // FIXME: Hard coded value for maximum CPU throughput
+      if (bandwidth > 5000000)
+        bandwidth = 5000000;
+
+      maxUpdateSize = bandwidth * nextUpdate / 1000;
       encodeManager.writeLosslessRefresh(req, server->getPixelBuffer(),
                                          cursor, maxUpdateSize);
     }