intel: overhaul the internal WSI interface

The goal is to hide X11 details from the rest of the driver and move closer to
upstream WSI extensions that are still in development.  As a result hiding X11
details, ENABLE_WSI_X11 is unnecessary and is removed.

To move closer to upstream WSI extensions, intel_gpu_associate_x11() is
removed.  The X11 connection is available much later in upstream WSI
extensions.

There is also a bug fix.  When a fence is used like this

  xglQueuePresent(..., fence);
  xglQueueSubmit(..., fence);
  xglWaitForFences(..., &fence);

it will (correctly) wait for the present to finish before waiting for the
command buffer.
diff --git a/icd/intel/fence.c b/icd/intel/fence.c
index d0b1648..b19cabd 100644
--- a/icd/intel/fence.c
+++ b/icd/intel/fence.c
@@ -28,7 +28,7 @@
 #include "kmd/winsys.h"
 #include "cmd.h"
 #include "dev.h"
-#include "wsi_x11.h"
+#include "wsi.h"
 #include "fence.h"
 
 static void fence_destroy(struct intel_obj *obj)
@@ -49,6 +49,14 @@
     if (!fence)
         return XGL_ERROR_OUT_OF_MEMORY;
 
+    if (dev->exts[INTEL_EXT_WSI_X11]) {
+        XGL_RESULT ret = intel_wsi_fence_init(fence);
+        if (ret != XGL_SUCCESS) {
+            intel_fence_destroy(fence);
+            return ret;
+        }
+    }
+
     fence->obj.destroy = fence_destroy;
 
     *fence_ret = fence;
@@ -58,6 +66,9 @@
 
 void intel_fence_destroy(struct intel_fence *fence)
 {
+    if (fence->wsi_data)
+        intel_wsi_fence_cleanup(fence);
+
     intel_bo_unref(fence->seqno_bo);
 
     intel_base_destroy(&fence->obj.base);
@@ -66,43 +77,17 @@
 void intel_fence_set_seqno(struct intel_fence *fence,
                            struct intel_bo *seqno_bo)
 {
-#ifdef ENABLE_WSI_X11
-    fence->x11 = NULL;
-#endif
-
-    intel_bo_unref(fence->seqno_bo);
-    fence->seqno_bo = intel_bo_ref(seqno_bo);
-}
-
-void intel_fence_set_x11(struct intel_fence *fence,
-                         struct intel_wsi_x11 *x11,
-                         struct intel_wsi_x11_window *win,
-                         uint32_t serial,
-                         struct intel_bo *seqno_bo)
-{
-#ifdef ENABLE_WSI_X11
-    fence->x11 = x11;
-    fence->x11_win = win;
-    fence->x11_serial = serial;
-#endif
-
     intel_bo_unref(fence->seqno_bo);
     fence->seqno_bo = intel_bo_ref(seqno_bo);
 }
 
 XGL_RESULT intel_fence_wait(struct intel_fence *fence, int64_t timeout_ns)
 {
-#ifdef ENABLE_WSI_X11
-    if (fence->x11) {
-        const bool wait = (timeout_ns != 0);
-        XGL_RESULT ret;
+    XGL_RESULT ret;
 
-        ret = intel_wsi_x11_wait(fence->x11, fence->x11_win,
-                fence->x11_serial, wait);
-        if (ret != XGL_SUCCESS)
-            return ret;
-    }
-#endif
+    ret = intel_wsi_fence_wait(fence, timeout_ns);
+    if (ret != XGL_SUCCESS)
+        return ret;
 
     if (fence->seqno_bo) {
         return (intel_bo_wait(fence->seqno_bo, timeout_ns)) ?