[ksmserver] Split xsession logout and shutdown into separate classes

Authored by davidedmundson on Nov 8 2018, 1:28 PM.

Description

[ksmserver] Split xsession logout and shutdown into separate classes

Summary:
This commit splits ksmserver's xsession shutdown logic from performing
the actual shutdown and running shutdown scripts and implement proposed
org.kde.Shutdown interface.

Intended longer term target is to move this to a separate executable.

KSMServer's existing logout dbus method still exists for compatibility
forwarding to the new interface.

There are 2 minor behavioural changes.

The shutdownMode property (which doesn't seem to do anything and is not
exposed in our UI) is not kept.

If you shutdown /whilst/ starting up somehow, previously we delayed
showing the logout prompt, we now delay performing the actual logout.

Test Plan:
Logged out / shut down using the old API
Logged out / shut down using the new DBus API

Reviewers: Plasma, apol, romangg

Reviewed By: Plasma, apol, romangg

Subscribers: romangg, apol, plasma-devel

Tags: Plasma

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