Makes bindings work with nested message loops

Dispatching a message may result in a nested message loop. When
dispatching a message we need to start a wait before dispatch, so that
if a nested message loop does result we continue dispatching messages.

BUG=none
TEST=covered by tests.
[email protected]

Review URL: https://codereview.chromium.org/1576603002

Cr-Commit-Position: refs/heads/master@{#368608}
4 files changed