This removes STATES from state.py and adds support to
statecheck class to handle its features.
getrepostate() function is modified accordingly.
This adds a method 'cmdutil.addunfinished()' for appending to
the unfinishedstate list so as to keep 'merge' and 'bisect' at the last.
This also makes two separate message formats for checkunfinished() and
getrepostate() as there were previously present.
Results of test changed are shown.
It seems like this should also be unified with the new tracking of unfinished operations. Will you have time to look into that after the current series?