[ozone/wayland] Properly dispatch events for modifier keys

When a modifier key is pressed, the ui::KeyboardEvent instance
must contain its modifier flags set, which is not the case for
Ozone/Wayland today.

CL fixes this by mimic'ing some of the existing logic in
KeyboardEvDev::DispatchKey.

CL also moves ::EventFlagToEvdevModifier from keyboard_evdev.cc
to ui/events/event_modifiers.h|cc, as a static method named
::GetModifierFromEventFlag (analogously to the existing
::GetEventFlagFromModifier).
This way, the method can be used from Ozone/Wayland code.

BUG=578890

Change-Id: I9608d23f4e0bc22dd1a5a1c74b4a55828753c330
Reviewed-on: https://chromium-review.googlesource.com/850772
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Cr-Commit-Position: refs/heads/master@{#528991}
6 files changed