Bug 1033402 - waitForSocket() before connecting to marionette.

Don't you want to return here? This is a bug in your code where if an error is thrown after the `connectionTimeout`, you continue to call `connect` indefinitely. Let's add a test here.