[client] Ensure PlasmaWindowModel removes deleted windows

Authored by graesslin on May 17 2016, 7:30 AM.

Description

[client] Ensure PlasmaWindowModel removes deleted windows

Summary:
There is a possibility that a PlasmaWindow is unmapped when the
PlasmaWindowModel gets created. In this situation the unmapped
PlasmaWindow will be deleted in the next event cycle. So far
PlasmaWindowModel didn't handle this situation and the model might
hold deleted objects due to this.

This change addresses this potential problem and ensures the model
gets updated when a PlasmaWindow is deleted.

Test Plan: Test case which exposes the problem is added

Reviewers: Plasma, hein

Subscribers: plasma-devel

Tags: Plasma

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