Wait for all javascript initialization to complete before loading the page
Wait for all javascript initialization to complete before loading the page

I was getting WSOD fairly regularly even after moving all the native
initialization into pluginInitialization code. So I added promises to the
javascript stuff and ensured that it was all complete before returning.

With this, I almost never get WSODs while running from XCode (10/10 times).
Still get errors sometimes while running from the emulator (every second or third time).

Couple of thoughts on the reasons:
- We don't have an icon defined. Somebody on the iconic forum claimed that
  adding a real icon fixed things for him.
- I hit a native code crash BADACCESS in the sqlite plugin, which would
  definitely cause a WSOD while running from the emulator. We could try having
  a single database with multiple tables instead of multiple databases.

shankari/e-mission-phone,shankari/e-mission-phone,shankari/e-mission-phone,shankari/e-mission-phone,e-mission/e-mission-phone,e-mission/e-mission-phone,e-mission/e-mission-phone,e-mission/e-mission-phone