better clean up of duplicate containments
Summary:
due to old multiscreen bugs, sometimes the appletsrc file
gets polluted with a lot of containments with same activity id
and lastScreen, in some cases even hundreds
(see https://bugs.kde.org/show_bug.cgi?id=371858)
in that case we can't be 100% sure what containment will be loaded
at startup, leading to an herratical behavior.
it was trying to clean up duplicates but wasn't really effective
now base upon lastScreen (so we catch other activities as well)
and manually remove the destroyed containment from
m_desktopContainments (which may sole some multiscreen
related bug, such as 371991)
BUG:371858
CCBUG:371991
Test Plan:
started a session with the corrupted appletsrc from the bugreport,
file gets cleaned out of duplicates
Reviewers: davidedmundson, Plasma
Reviewed By: davidedmundson, Plasma
Subscribers: davidedmundson, plasma-devel
Tags: Plasma
Differential Revision: https://phabricator.kde.org/D3981