Rewrote caret implementation to store the information in the server.

diff --git a/windows/win.c b/windows/win.c
index d19cc09..a7e0c4e 100644
--- a/windows/win.c
+++ b/windows/win.c
@@ -1392,7 +1392,12 @@
  */
 static void WIN_SendDestroyMsg( HWND hwnd )
 {
-    if( CARET_GetHwnd() == hwnd) DestroyCaret();
+    GUITHREADINFO info;
+
+    if (GetGUIThreadInfo( GetCurrentThreadId(), &info ))
+    {
+        if (hwnd == info.hwndCaret) DestroyCaret();
+    }
     if (USER_Driver.pResetSelectionOwner)
         USER_Driver.pResetSelectionOwner( hwnd, TRUE );