CB-5733 Fix IAB.close() not working if called before show() animation is done

Also attempts to fix some thread warnings by doing show/hide on
separate event loop cycles.
Remove _alive from InAppBrowser.js since it didn't catch the case where the browser is closed by the user.