ozone/platform/wayland: Use more realistic event processing and request flushing in tests

Now, we use a MessageLoop and wait for idle to determine when the client has
processed pending events.

This uncovered a number of situations where Wayland platform was not flushing
the connection. To resolve this, add a ScheduleFlush method to flush at some
later time, and call it when we send requests.

BUG=578890

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

Cr-Commit-Position: refs/heads/master@{#380419}
10 files changed