[ozone/wayland] Reset implicit grab only after an event has been sent.

Reset implicit grab only after the event has been sent. Otherwise, we
may end up in a situation, when a target checks for a pointer grab on the
MouseRelease event type, and fails to release mouse pressed handlers
and reset capture with a capture controller.

TEST=./out/OzoneLinux/ozone_unittests --gtest_filter=
XdgVersionV5Test/WaylandPointerTest.ButtonPressAndCheckCapture/0
XdgVersionV5Test/WaylandPointerTest.ButtonReleaseAndCheckCapture/0
XdgVersionV6Test/WaylandPointerTest.ButtonPressAndCheckCapture/0 (1 ms)
XdgVersionV6Test/WaylandPointerTest.ButtonReleaseAndCheckCapture/0

Bug: 578890

Change-Id: Ia8810e5bac46bc49b356e7f79d3bba875dc72416
Reviewed-on: https://chromium-review.googlesource.com/1051787
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Cr-Commit-Position: refs/heads/master@{#559815}
3 files changed