dix/privates.c: Avoid undefined behaviour after realloc()

Adding the offset between the realloc result and the old allocation to
update pointers into the new allocation is undefined behaviour: the
old pointers are no longer valid after realloc() according to the C
standard. While this works on almost all architectures and compilers,
it causes  problems on architectures that track pointer bounds (e.g.
CHERI or Arm's Morello): the DevPrivateKey pointers will still have the
bounds of the previous allocation and therefore any dereference will
result in a run-time trap.

I found this due to a crash (dereferencing an invalid capability) while
trying to run `XVnc` on a CHERI-RISC-V system. With this commit I can
successfully connect to the XVnc instance running inside a QEMU with a
VNC viewer on my host.

Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
5 jobs for fix-dix-realloc-ub in 4 minutes and 29 seconds (queued for 7 seconds)
Status Job ID Name Coverage
  Docker Image
passed debian-buster #12097338

00:00:15

 
  Build And Test
passed autotools #12097339

00:04:13

passed meson #12097340

00:02:24

passed meson-noglamor #12097341

00:01:43

passed mingw-cross-build #12097342

00:00:33