Bug
1773264 - Refactor actions support, r=webdriver-reviewers,whimboo
Move from having lots of switch/case statements to dispatch the
correct actions to a more normal OO setup where each action type is
represented by a class with a static fromJSON method for construction,
and a `dispatch()` method for emitting the event.
The state is also passed around explictly rather than being stored in
a module global. This will allow us to have e.g. different state per
session.
Differential Revision: https://phabricator.services.mozilla.com/
D139119