Let layoutAndPaintAsync() schedule commit asynchronously

Previously in single-threaded mode we let layoutAndPaintAsync()
call commit synchronously and callback asynchronously. The synchronous
commit causes reentrant of notifyDone() or requestAnimationFrame() for
some tests having event handlers that are triggered by layout.

Avoid reentrant by making commit always asynchronous.

BUG=485428,484706
TEST=Webkit layout tests when they use layoutAndPaintAsyncThen().

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

Cr-Commit-Position: refs/heads/master@{#328815}
2 files changed