Bug 974048 - Improve waiting for wifi in wifi connection tests