waitForWindow()/waitForDialog() test function tweaks
waitForWindow()/waitForDialog() test function tweaks

- Give any window onload functions time to run before running
  waitForWindow()
- Allow custom dialog URI in waitForDialog

rmzelle/zotero,retorquere/zotero,gracile-fr/zotero,gracile-fr/zotero,hoehnp/zotero,hoehnp/zotero,retorquere/zotero,retorquere/zotero,gracile-fr/zotero,hoehnp/zotero,rmzelle/zotero,rmzelle/zotero