[pushModal] Fix rare bug which manifests when exiting modal state

When exiting modal state, on rare occasions, Cinnamon can enter a situation in which it issues the following messages, after which any subsequent attempt to enter modal state again, such as opening Alt-Tab, will cause Cinnamon to hang. This is caused by the handler that cleans up after a window in the focus chain has been closed, which removes the wrong window from the focus chain: instead of removing the destroyed window it removes the window that was made modal when the destroyed window had focus. This bug was inherited from Gnome Shell.
````
Window manager warning: Log level 16: /build/buildd/glib2.0-2.32.3/./gobject/gsignal.c:2572: instance `0xbb78950' has no handler with id `92896'
JS ERROR: !!!   Exception was: Error: incorrect pop
JS ERROR: !!!     lineNumber = '1002'
JS ERROR: !!!     fileName = '"/usr/share/cinnamon/js/ui/main.js"'
JS ERROR: !!!     stack = '"popModal([object _private_St_Bin])@/usr/share/cinnamon/js/ui/main.js:1002
()@/usr/share/cinnamon/js/ui/windowManager.js:1033
([object _private_St_Bin],[object _private_Clutter_Event],false)@/usr/share/cinnamon/js/ui/windowManager.js:1103
([object _private_St_Bin],[object _private_Clutter_Event])@/usr/share/gjs-1.0/lang.js:116
"'
JS ERROR: !!!     message = '"incorrect pop"'
````