Bug 1040045 - Move code for waiting for the homescreen in gaiatest into its own method. r=dhunt