Use KRun::runApplication when possible; split out and share more code.

Authored by hein on Jun 23 2017, 1:12 PM.

Description

Use KRun::runApplication when possible; split out and share more code.

Summary:
Also better sanity-checking of found services being app services
all around.

I'm not particularly happy about adding more X11 code outside of
XWindowTasksModel, but it means greater code reuse (in something that
has experienced unwelcome drift before) and there's a precedent in
LauncherTasksModel.

Reviewers: Plasma, broulik

Subscribers: plasma-devel

Tags: Plasma

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