desktop-shell: don't run fade animation if compositor is inactive

When a window is closed, Weston will, by default, run a fade out animation and
defer destroying the underlying surface until it completes. However, if the
compositor is sleeping, and therefore not rendering any frames, this animation
will *never* complete. Therefore, if windows are repeatedly created and
destroyed while in sleep mode, these surfaces will keep accumulating, and since
the buffers attached to them may be backed by an fd, eventually the ulimit will
be reached resulting in a potential crash or other errors.

This can be demonstrated repeatedly launching and killing an X11 application
with Xwayland running.

while true; do xterm & pid=$!; sleep 0.5; kill $pid; done

As soon as the compositor goes to sleep, one can observe a steadily growing
list of dmabufs in the output of lsof.

As a fix, desktop_surface_removed should check whether the compositor is active
before kicking off the fade animation. If it is not, it should instead drop the
extra reference taken in desktop_surface_committed and then destroy the surface
immediately.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
5 jobs for sleep-leak-fix in 3 minutes and 28 seconds (queued for 2 seconds)
latest
Status Job ID Name Coverage
  Container Prep
passed #10275157
container_prep

00:00:16

 
  Build
passed #10275159
kvm
build-docs

00:01:05

passed #10275158
kvm
build-full

00:02:44

passed #10275160
kvm
build-no-gl

00:01:41

 
  Pages
passed #10275161
docs-and-coverage

00:00:26