Rebase (merge)

This PR introduces the beginnings of rebase functionality, making use of `git_merge`, which provides compatibility with rebases that were performed using `git-rebase --merge`.

Though I'm fairly happy with the API, I will call out a few stylistic questions below.  As an example, though, to perform a rebase, one would:

    git_rebase(repo, branch_head, master_head, NULL, signature, NULL);

    while ((error = git_rebase_next(repo, checkout_opts)) == 0)
        git_rebase_commit(&commit_id, repo, NULL, signature, NULL, NULL);

    if (error != GIT_ITEROVER)
        die();

    git_rebase_finish(repo, signature, NULL);

Notes:
- The default type of rebase is based around patch application.  This means that rebases that were started with git.git (without explicitly specifying the `--merge` flag) are not supported.  I have made some progress with patch application in #2280 but I put it on hold to tackle this aspect of rebase.

I think that this is ready for review!
It does not, in fact.  The signature is an arg to `rebase_init` only so that it can write the reflog when detaching HEAD.  The signature is not actually stored anywhere (aside from the reflog) so if we are continuing a rebase that is already in progress (perhaps started by git) then we cannot load that signature.

(Perhaps more importantly, as far as the user is concerned, we wouldn't want to re-use the timestamp from the signature of the commit that started the rebase.)