Bug 22989: Fix dimensions of new windows on macOS.
Before this patch, a new Tor Browser window, non-maximized,
was showing a "don't maximize this window" notification briefly
as soon as it was first displayed. Worse, the notification box
that appears causes the window height to increase by 10 or 11
pixels and thus breaks our desired window dimension rounding.
Our intended behavior is that this notification only be shown
when the window is maximized by the user. I discovered that,
on macOS, windowState === window.STATE_MAXIMIZED for a short
time when the window is first created. Then it rapidly changes
to windowState === window.STATE_NORMAL. So I added a `setTimeout`
promise to postpone checking the window size until after
window creation "settles" and that seems to be enough to ensure
we avoid showing the spurious notification box at window
creation.
Also fixes Bug 22543, "Tor Browser 7.0 shows window
resize warning on every new window for a few seconds". And
fixes issues raised in comments 2 and 3 in that ticket as well.