autotests: Fix Test::waitForWindowDestroyed
Before Deleted merge, it used to be equivalent to waiting until the window is closed.
This fixes tests waiting until the window closing animation completes and the Window object is destroyed.
Edited by Vlad Zahorodnii