rebase: refactor dryrun implementation

Authored by khanchi97.

Description

rebase: refactor dryrun implementation

This patch refactor dry-run code to make it easy to add additional
functionality in dryrun. Otherwise we had to add every functionality
through _origrebase() which does not seem a good implementation.

Differential Revision: https://phab.mercurial-scm.org/D3849

Details