protocol: allow immediate wl_buffer.destroy if not re-used

Allow wl_buffer objects to be destroyed without having to wait for
wl_buffer.release if the underlying storage isn't going to be
re-used.

The main motivation for this is to avoid glitches when a client is
torn down. When a client disconnects, all of its objects are destroyed
in arbitrary order. However some compositors will still need to
access the destroyed buffer's underlying storage afterwards, e.g. for
visual effects (fade-out) or for atomic layout updates (wait for other
clients to commit a new buffer before hiding the buffer).

It's still incorrect for clients to destroy a wl_buffer and mutate
the underlying storage without waiting for wl_buffer.release.

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: wayland/wayland#185
3 jobs for destroy-buffer-without-reuse in 1 minute and 43 seconds (queued for 16 seconds)
Status Job ID Name Coverage
  Review
passed #10115411
check-commit

00:00:25

 
  Prep
passed #10115412
debian:buster@container-prep

00:00:33

 
  Build
passed #10115413
build-native

00:00:44