[server] Standardize the destructor request handling for Resources

Authored by graesslin on May 25 2016, 8:04 AM.

Description

[server] Standardize the destructor request handling for Resources

Summary:
This change standardizes the behavior regarding the destructor request.

The destructor should destroy the resource and nothing else. The
Wayland library invokes the static unbind method once the resource is
destroyed. The implementation provided by Resource::Private::unbind
triggers a delete later on the Resource. So there is no need to trigger
a deleteLater from the destructor request callback.

This change adds a generic implementation to Resource::Private which is
now used by all inheriting classes replacing the custom implementations.

Test Plan:
For a few Resources the test is extended to ensure that the Resource
gets deleted on server side.

Reviewers: Plasma

Subscribers: plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D1679