Added waitForIdle(int timeout) to UiDevice