evolve: add --rev option to the evolve command
This patch is part of a series of patches to refactor the evolve method and
make it more readable. We introduce a new --rev flag to specify a revset
where to solve the troubles instead of looking from the parent changeset.
All add a test checks that --rev works with several commits
evolve: extract cleanup logic in the evolve function
We are going to need to reuse the cleanup logic when introducing --rev, so
we extract it in a method to avoid code duplication.