Bug 1027232 - Restart b2g at each app. Wait for the homescreen to be ready

We need a way to do this that's repeatable/deterministic and not time-based. Perhaps we can do something to the effect of polling the marionette tcp port to see when it's up.