server: add wl_global_set_user_data

When implementing a workaround for [1], one needs to accept a global to be
bound even though it has become stale.

Often, a global's user data is free'd when the global needs to be destroyed.
Being able to set the global's user data (e.g. to NULL) can help preventing a
use-after-free.

(The alternative is to make the compositor responsible for keeping track of
stale user data objects via e.g. refcounting.)

[1]: wayland/wayland#10

Signed-off-by: Simon Ser <contact@emersion.fr>
1 job for global-set-user-data in 1 minute and 48 seconds (queued for 8 seconds)
latest
Status Job ID Name Coverage
  Build
passed #438066
build-native

00:01:48