Add platform detection and adjustment to kded
Current Plasma/master branch does no longer set the QT_QPA_PLATFORM env
variable on Wayland. As kded is a process tightly connected to the
workspace it also needs to pick wayland QPA in a Wayland session. This
change brings in the adjustment from plasma-workspace and ensures that
kded works correctly on any Wayland desktop environment, being it
Plasma, GNOME or Weston.
Committed on Martin's behalf by mpyne
Differential Revision: https://phabricator.kde.org/D11583