Bug 904136 - Intermittent test failure: TEST-UNEXPECTED-FAIL | simple-prefs/main.testAOM | Timed out

Fixing a race condition, waiting for the document to completely load before running test code.
Merge pull request #1167 from erikvold/904136

Bug 904136 - Intermittent test failure: TEST-UNEXPECTED-FAIL | simple-prefs/main.testAOM | Timed out r=@Mossop