chistedit: move event() onto state class
Differential Revision: https://phab.mercurial-scm.org/D11641