tests: have a more elaborated test for _destrebase
The previous repo had a single lineage and a single head, pretty boring for
rebase related testing.
histedit: break _histedit function into smaller pieces
We add _getgoal, _validateargs.
This is a part of bigger effort to refactor histedit. Initial steps are to
break _histedit function into smaller pieces which will supposedly be more
understandable. After this is done, I will have a better understanding
of how histedit works and apply that to fix
issue4800.