Managing lifetime of objects during tear down is a bit clunky in KWin
mostly because the wayland server outlives the workspace.
3f4e7334684 tried to tackle one aspect of this problem, but the proposed
solution is good only in short term. If a ShellClient wants to discard
force temporarily rules, it needs to access RuleBook, whose lifetime is
bounded to the workspace, no matter what happens. Otherwise, the force
temporarily rule will be applied again on the next startup.
It's worth to mention that there was another attempt to address this
problem, see commit 826b9742e95. It was reverted because some internal
clients may need to destroy Wayland resources during tear down.
This change takes another approach. In order to ensure that ShellClient
can access RuleBook during tear down, we manually destroy Wayland clients
in destructor of the Workspace class. Something is done already for X11