Converting (Alt+LeftClick -> RightClick) to (Search+LeftClick -> RightClick)

Some web apps have behaviors for Alt+LeftClick so we had to do this
conversion.

However this change will result in popping up the AppList whenever
Search+Click is pressed and then search is released while in a web
app that consumes the Search+Click by showing a context menu and
then prevents default. This context menu differs from the native
context menu in that it doesn't have its own MenuEventDispatcher.
So the Search release event is passed to the accelerator controller
and then the controller thinks the both current and previous
accelerators are the "Search" key.

We had to fix this by listening to mouse events in the AcceleratorFilter
and then clear the current accelerator in the accelerator history.

BUG=248762
TEST=unit_tests --gtest_filter=EventRewriterTest.*

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

Cr-Commit-Position: refs/heads/master@{#328213}
7 files changed