Fix issue when iterating the entries

Every time you call entries.pop(), the entries.length minus 1.
We should check entries.length>0 as the end of loop.

This request is same as pull request #2426. fix a typo error.
Using Async.queue to queue commands
Merge pull request #2411 from sebv/1.0-android-queue

Using Async.queue to queue android commands
fix safari phishing test
Improve DumpWindowHierarchy.java