Ensures that all Wayland objects are destroyed and the cleanup handling is performed before tearing down the Compositor. This fixes for example a crash if a Surface with a Shadow is still around at tear down.