chistedit: move renderpatch() and dependencies onto state class
Differential Revision: https://phab.mercurial-scm.org/D11640