Be more careful when destroying wl_resources

The compositor must not destroy wl_resources when it wants to, else it
breaks the contract with the client.

Change-Id: Ic0d298072cdf0954d2504c04bff2bcc99733e621
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>