Fix MetaStackTracker usage without an Xserver
We still were indirectly relying on x11 code paths in order to update the MetaStackTracker state. Take those portions out of x11-specific code, into generic code.
Fixes stacking issues with --no-x11 and xwayland-on-demand while there's no x11 clients.