Avoid busy waiting in SchedulerImpl.runRepeatingTasks

If all task are finished in the queue, the code was doing
busy waiting. Added detection for finished task, thus returning
as soon as possible.

Fixes issue 7307.

Change-Id: I288975242600fe5fc13b9bcb356f9807894bb2cb
Review-Link: https://gwt-review.googlesource.com/#/c/1750/

Review by: goktug@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11487 8db76d5a-ed1c-0410-87a9-c151d255dfc7
2 files changed