window: Only consider visible windows modal/attached
Minimizing modal dialogs is highly unconventional - and in fact disabled in our own code - but apps can still do it programmatically.
Take this into account when checking whether a window has modal or attached transients, as including hidden windows is unexpected in both cases.
Related: gnome-shell#5581 (closed)