Properly terminate server on timeouts

Do a proper cleanup when one of the termination timeouts trigger
rather than just exiting on the spot. This makes sure we don't leave
stray stuff around, e.g. unix socket files.
diff --git a/win/rfb_win32/SDisplay.h b/win/rfb_win32/SDisplay.h
index 76ddf50..6dbfabb 100644
--- a/win/rfb_win32/SDisplay.h
+++ b/win/rfb_win32/SDisplay.h
@@ -72,6 +72,7 @@
 
       virtual void start(VNCServer* vs);
       virtual void stop();
+      virtual void terminate();
       virtual void queryConnection(network::Socket* sock,
                                    const char* userName);
       virtual void pointerEvent(const Point& pos, int buttonmask);
@@ -89,6 +90,7 @@
       // -=- EventHandler interface
 
       HANDLE getUpdateEvent() {return updateEvent;}
+      HANDLE getTerminateEvent() {return terminateEvent;}
       virtual void processEvent(HANDLE event);
 
       // -=- Notification of whether or not SDisplay is started
@@ -161,6 +163,8 @@
 
       // -=- Event signalled to trigger an update to be flushed
       Handle updateEvent;
+      // -=- Event signalled to terminate the server
+      Handle terminateEvent;
 
       // -=- Where to write the active/inactive indicator to
       bool* statusLocation;