Move access rights and closing to SConnection object

This makes it generally useful and other code doesn't have to
know of the specific sub-class.
diff --git a/common/rfb/VNCServerST.h b/common/rfb/VNCServerST.h
index 54443e1..0fa2c87 100644
--- a/common/rfb/VNCServerST.h
+++ b/common/rfb/VNCServerST.h
@@ -99,6 +99,7 @@
     virtual void approveConnection(network::Socket* sock, bool accept,
                                    const char* reason);
     virtual void closeClients(const char* reason) {closeClients(reason, 0);}
+    virtual SConnection* getConnection(network::Socket* sock);
 
     virtual void add_changed(const Region &region);
     virtual void add_copied(const Region &dest, const Point &delta);
@@ -133,11 +134,6 @@
     // any), and logs the specified reason for closure.
     void closeClients(const char* reason, network::Socket* sock);
 
-    // getSConnection() gets the SConnection for a particular Socket.  If
-    // the Socket is not recognised then null is returned.
-
-    SConnection* getSConnection(network::Socket* sock);
-
     // queryConnection() is called when a connection has been
     // successfully authenticated.  The sock and userName arguments identify
     // the socket and the name of the authenticated user, if any.