Handle requests to unmanaged windows gracefully

These commits fixes issues where clients would make requests on surfaces where the window was unmanaged directly by the compositor without going through things such as xdg_toplevee.close. This can happen when the toplevel was a attached modal dialog, meaning it'd be unmanaged together with its parent.

Two bonus fixes include handling of frame callbacks queued at the same time as xdg_toplevel/xdg_popups being reset.

Merge request reports