- use global atoms for the format ids
- add timeout when calling XCheckTypedWindowEvent
- fix broken IsClipboardFormatAvailable; it tried to do a trick with
  EnumClipboardFormats by making incorrect assumptions
- in X11DRV_IsClipboardFormatAvailable do a quick exit if no one owns
  the selection
- add 1 second *minimum* time lapse between XSelectionOwner calls
- sync clipboard ownership between different wine processes
- prevents apps from getting into wierd state where they thought they
  didn't own the selection but they did and as a result queried
  themselves for available selection data

diff --git a/server/thread.c b/server/thread.c
index c6ef4ac..a600bf1 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -210,6 +210,7 @@
     if (thread->wait_fd) release_object( thread->wait_fd );
     if (thread->hooks) release_object( thread->hooks );
     free_msg_queue( thread );
+    cleanup_clipboard_thread(thread);
     destroy_thread_windows( thread );
     for (i = 0; i < MAX_INFLIGHT_FDS; i++)
     {