It was implemented together with MetaStageImpl, move it to a separate file. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1862>