More reliable OAuth popup closing in iOS Chrome.

`window.close()` appears to be flakey in iOS Chrome... I've seen it work
sometimes but it doesn't seem to be reliable (ex: it works from an
onclick handler, but not in a script tag, but it does work in an onerror
of an <img> tag).

As a fallback for `window.close()`, the main window now polls for when
the popup has put a marker in localStorage to indicate that it's done
with its work.