Bug 1021270 - Focus the top active window while permission dialog hide

Do we need to wait for next paint after it's is loaded?

Also, looking at `app_window.js`, it looks like `loaded` is abstraction of `mozbrowserloadend`. I don't think `loadend` has anything to do with focus so if the cause of this bug is really what you think, we shouldn't be needing this part at all.