Make CSS transplantation in OO.ui.Frame actually wait for CSS

Before e9ca44c86, there was code in place that waited for the CSS
to load and fired 'initialize' asynchronously. It was initially removed
because it was deemed unnecessary, but with later changes it has become
necessary again. The original approach also didn't work in Chrome.

This commit completely rewrites the CSS transplantation code to
correctly wait for CSS to be loaded before emitting 'initialize',
and to unbreak image URL references by no longer inlining same-origin
styles.

The new code transplants <style> tags directly, while <link> tags
are rewritten as <style>@import url(..); #foo { ... }</style>. We then
insert a <div id="foo"> into the document and wait for it to get styled,
which will only happen after the @import has finished. For the styling
of #foo we use font-family, because it allows us to set arbitrary
string values.

Additionally, we have to use visiblity: hidden; to hide windows
initially, because display: none; causes the iframe to not load in
Firefox. We reapply display: none; after the iframe initializes.

Bug: 56630
Change-Id: I76688a5ad7bd144c5e46064119f607060e76f0d9