Move congestion control to its own class

It's a general function and it's better to have that particular
complexity in its own place.
diff --git a/common/rfb/VNCSConnectionST.h b/common/rfb/VNCSConnectionST.h
index 7022d8a..96d7e4c 100644
--- a/common/rfb/VNCSConnectionST.h
+++ b/common/rfb/VNCSConnectionST.h
@@ -27,15 +27,13 @@
 #ifndef __RFB_VNCSCONNECTIONST_H__
 #define __RFB_VNCSCONNECTIONST_H__
 
-#include <list>
 #include <set>
 
+#include <rfb/Congestion.h>
 #include <rfb/EncodeManager.h>
 #include <rfb/SConnection.h>
 #include <rfb/Timer.h>
 
-struct RTTInfo;
-
 namespace rfb {
   class VNCServerST;
 
@@ -161,9 +159,7 @@
 
     // Congestion control
     void writeRTTPing();
-    void handleRTTPong();
     bool isCongested();
-    void updateCongestion();
 
     // writeFramebufferUpdate() attempts to write a framebuffer update to the
     // client.
@@ -190,14 +186,7 @@
     unsigned fenceDataLen;
     char *fenceData;
 
-    unsigned baseRTT;
-    unsigned congWindow;
-    unsigned ackedOffset, sentOffset;
-
-    unsigned minRTT;
-    bool seenCongestion;
-    Timer congestionTimer;
-    std::list<struct RTTInfo> pings;
+    Congestion congestion;
 
     VNCServerST* server;
     SimpleUpdateTracker updates;