radv: Check that the master_fd actually is a master.

Since 8059add04 "drm: allow render capable master with DRM_AUTH ioctls" in
the kernel, the assumption that the fd from a primary node that is working
for rendering is a master fd, is not true anymore.

This causes issues in that if we already have a "master fd", leases stop
working as it only allows 1 master fd for the wsi.

This open codes drmIsMaster because I don't think we should bump libdrm
requirements in backports.

Fixes: 451b58a5 "radv: Add KHR_display extension to radv [v5]"
14 jobs for !669 with master-check in 14 minutes and 21 seconds (queued for 4 seconds)
detached
Status Job ID Name Coverage
  Containers Build
passed debian #242451

00:01:37

 
  Build+Test
passed meson-clang #242453

00:12:43

passed meson-gallium-clover-llvm #242459

00:07:11

passed meson-gallium-clover-llvm39 #242460

00:05:04

passed meson-gallium-drivers-other #242458

00:09:13

passed meson-gallium-radeonsi #242457

00:06:07

passed meson-gallium-st-other #242461

00:07:09

passed meson-gallium-swr #242452

00:10:12

passed meson-glvnd #242456

00:04:33

passed meson-loader-classic-dri #242455

00:07:31

passed meson-vulkan #242454

00:02:41

passed scons-llvm #242463

00:06:34

passed scons-nollvm #242462

00:04:32

passed scons-swr #242464

00:08:01