Introduce git_rebase to set up a rebase session

Introduce `git_rebase` to set up a rebase session that can
then be continued.  Immediately, only merge-type rebase is
supported.
Introduce git_rebase_abort

Abort an in-progress rebase and move the working directory and
repository back to the ORIG_HEAD state.
Introduce git_rebase_next

`git_rebase_next` will apply the next patch (or cherry-pick)
operation, leaving the results checked out in the index / working
directory so that consumers can resolve any conflicts, as appropriate.
Write conflicts nicely during rebase application