compositor: Add support for adaptive vsync with GLX

Adaptive vsync, or its proprietary equivalent g-sync, works by using -1
as the swap interval.

Add support for GLX_EXT_swap_control_tear to check whether this is safe
to use, so that we can support adaptive vsync where available.

Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
Closes: #515
2 jobs for !24 with adaptive-vsync in 2 minutes and 59 seconds (queued for 2 seconds)
detached
Status Job ID Name Coverage
  Build
passed #11303
build

00:01:14

 
  Distcheck
passed #11304
distcheck

00:01:44