For the purpose of handling states for various multistep operations like
`hg graft`, `hg histedit`, `hg bisect` et al a new class called statecheck
is created .This will help in having a unified approach towards these commands
and handle them with ease.
The class takes in 4 basic arguments which include the name of the command, the
name of the state file associated with it , clearable flag , allowcommit flag.
This adds the support of `checkunfinished()` and
`clearunfinished()` to the class.
This also adds a registering mechanism for unfinishedstate `addunfinished()`.
Tests remain unchanged.