馃崚 plasma-shutdown: Correclty detect if we're using the legacy session
We need different shutdown paths for the systemd and legacy boot. The current code worked by making the systemd call to end the session and checking the return status.
This worked for handling the situation where systemd is not installed. It does not capture the case where the systemd boot is explicitly disabled. The call successfully does nothing.
Instead replace with an explicit check that our target is activated.
Also change to end the plasma-workspace.target as that's semantically more correct given it's the one we started. This is bound to the graphical-session so it ends up being the same thing.
(cherry picked from commit 41629e86)