Encapsulate screen layout storage in ConnParams

Avoid direct access to the screen dimensions and layout so that we
can make sure it stays sane. This also makes sure the layout is
properly updated when we only get the screen dimensions from the
server.
diff --git a/common/rfb/ConnParams.h b/common/rfb/ConnParams.h
index b56c940..1640efc 100644
--- a/common/rfb/ConnParams.h
+++ b/common/rfb/ConnParams.h
@@ -62,9 +62,11 @@
       return !beforeVersion(major,minor+1);
     }
 
-    int width;
-    int height;
-    ScreenSet screenLayout;
+    const int width() const { return width_; }
+    const int height() const { return height_; }
+    const ScreenSet& screenLayout() const { return screenLayout_; }
+    void setDimensions(int width, int height);
+    void setDimensions(int width, int height, const ScreenSet& layout);
 
     const PixelFormat& pf() const { return pf_; }
     void setPF(const PixelFormat& pf);
@@ -105,6 +107,10 @@
 
   private:
 
+    int width_;
+    int height_;
+    ScreenSet screenLayout_;
+
     PixelFormat pf_;
     char* name_;
     Cursor* cursor_;