rebase: remove sortedstate-related confusion
The following rebase implementation details are frustrating:
- storing a list of sorted revision numbers in a field named sortedstate
- having sortedstate be a field of the rebaseruntime class
- using sortedstate[-1] as opposed to a more intuitive max(self.state) to
compute the latest revision in the state
This commit fixes those imperfections.
#require docutils gettext
$ $TESTDIR/check-gendoc zh_CN
checking for parse errors