Xi: Work around broken libxcb that doesn't ignore unknown device classes

libxcb 14.1 and older are not forwards-compatible with new device
classes as it does not properly ignore unknown device classes. Since
breaking libxcb would break quite a lot of applications, we instead
report Gesture device class only if the client advertised support for XI

Clients may still not work in cases when a client advertises XI 2.4
support and then a completely separate module within the client uses
broken libxcb to call XIQueryDevice.

Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
5 jobs for xi2-gestures in 5 minutes and 5 seconds (queued for 2 seconds)
Status Name Job ID Coverage
  Docker Image
passed debian-buster #10254991


  Build And Test
passed autotools #10254992


passed meson #10254993


passed meson-noglamor #10254994


passed mingw-cross-build #10254995