Dialog: Fix resizing with iframes / Single div version

Create a full-window overlay during resize instead of having a dedicated
overlay per iframe. Full-window overlay will keep hiding the iframes
even when their size changes.

Fixes #9919

--

This is an alternative to pull request #1214. Unlike the previous pull request, which only alters the size of previously added elements, this one replaces the old elements with a single new one.

Tested in up to date Chrome, Firefox and IE11 using IE7-11 emulation modes. However I'm still a bit uncertain about the div css. It seemed to work in all browsers, but I do remember problems with such divs in old IE versions.