[Backport to 3.34] wayland: preserve `xkb_state` on VT switch
On VT switch, the devices are removed, which means for Wayland disabling the keyboard.
When the keyboard is disabled, the associated xkb_state
is freed and
recreated whenever the keyboard is re-enabled when switching back to the
compositor VT.
That means the xkb_state
for Wayland is lost whereas the same for
clutter is kept, which causes to a discrepancy with locked modifiers on
VT switch.
To avoid that issue, preserve the XKB info only to dispose it when the keyboard is eventually finalized.
Closes: #344 (closed) !1185 (merged) (cherry picked from commit 5b30a52b)