Rationale:
- it was a bit of a dumping ground
- for wayland we might want to replace the session manager
- for systemd units we want to replace the autostart/shutdown code
- it's a pre-requisite to making xwayland optional/ondemand
First step is to tidy and split