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/vncviewer/CConn.cxx b/vncviewer/CConn.cxx
index 69186c5..e87ebcd 100644
--- a/vncviewer/CConn.cxx
+++ b/vncviewer/CConn.cxx
@@ -191,7 +191,7 @@
   strcat(infoText, "\n");
 
   snprintf(scratch, sizeof(scratch),
-           _("Size: %d x %d"), cp.width, cp.height);
+           _("Size: %d x %d"), cp.width(), cp.height());
   strcat(infoText, scratch);
   strcat(infoText, "\n");
 
@@ -324,7 +324,8 @@
 
   serverPF = cp.pf();
 
-  desktop = new DesktopWindow(cp.width, cp.height, cp.name(), serverPF, this);
+  desktop = new DesktopWindow(cp.width(), cp.height(),
+                              cp.name(), serverPF, this);
   fullColourPF = desktop->getPreferredPF();
 
   // Force a switch to the format and encoding we'd like
@@ -478,7 +479,8 @@
       if (cp.supportsContinuousUpdates) {
         vlog.info(_("Enabling continuous updates"));
         continuousUpdates = true;
-        writer()->writeEnableContinuousUpdates(true, 0, 0, cp.width, cp.height);
+        writer()->writeEnableContinuousUpdates(true, 0, 0,
+                                               cp.width(), cp.height());
       }
     }
   } else {
@@ -508,9 +510,10 @@
     return;
 
   if (continuousUpdates)
-    writer()->writeEnableContinuousUpdates(true, 0, 0, cp.width, cp.height);
+    writer()->writeEnableContinuousUpdates(true, 0, 0,
+                                           cp.width(), cp.height());
 
-  desktop->resizeFramebuffer(cp.width, cp.height);
+  desktop->resizeFramebuffer(cp.width(), cp.height());
 }
 
 // autoSelectFormatAndEncoding() chooses the format and encoding appropriate
@@ -647,7 +650,7 @@
 
   if (forceNonincremental || !continuousUpdates) {
     pendingUpdate = true;
-    writer()->writeFramebufferUpdateRequest(Rect(0, 0, cp.width, cp.height),
+    writer()->writeFramebufferUpdateRequest(Rect(0, 0, cp.width(), cp.height()),
                                             !forceNonincremental);
   }