This commit moves cmdutil.STATES and adjoining functions to
state.py. The existing users are updated accordingly.
Tests remain unchanged.
Nit: This should be moved to the patch that introduced the bad formatting.
This feels a lot like morestatus functionality and should perhaps have been left in cmdutil.py.
morestatus functionality is left in cmdutil.py only the place where it checks for unfinished states that is _morestatus has been moved here.
_getrepostate not more status
Should drop the _ from _getrepostate since it's no longer private.