mus: Fix handled status in UI event ack, add MessageLoop::NestingObserver

mus applications receive their events from the window server, which runs
in another process.

Currently all input events to a mus application are immediately acked as
handled, because it's possible the event will start a nested message loop
(e.g. by spawning a context menu) and we don't want the event delivery
message to time out.

With this CL we observe for a message loop starting and if we see one we
immediately ack the event to avoid a timeout. Otherwise we process the
event normally and return a correct handled status.

BUG=604069
TEST=added to base_unittests and views_mus_unittests

Review-Url: https://codereview.chromium.org/1891233006
Cr-Commit-Position: refs/heads/master@{#390259}
10 files changed