Dialog: Switch back to shuffling z-index, but only look at .ui-front siblings

Fixes #9166 - Dialog: moveToTop implementation resets flash/video/iframe/scroll

I added unit and visual tests and verified it works, but I want to look through the ticket again and other related tickets to make sure we're now covering all the cases.

Still, would appreciate some feedback on this, in case I'm missing something big.