Proper MessageLoop::IsIdleForTesting() that corresponds to the actual idleness criteria for MessageLoop.

A pre-requirement for a simpler ScopedTaskEnvironment::RunUntilIdle()
implementation.

R=fdoray@chromium.org

Bug: 708584
Change-Id: I6c35d72868ab313788c166c76e179c8cd3ace438
Reviewed-on: https://chromium-review.googlesource.com/847752
Reviewed-by: Fran├žois Doray <fdoray@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526750}
4 files changed