This code unified the two state detection APIs used by `hg status --verbose`
and `hg resolve`. This adds a state managing class which handles various aspectsmoves `cmdutil.unfinishedstates`, `checkunfinished()`,`clearunfinished()`
of current multistep commands like `hg graft`,to `state.py`. `hg histedit` et al which belong
to both core and extensionsthe already existing users of this module are updated accordingly.
Test results remain unchanged.