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!
Which "other clients" would this be? Is it meant for the user of libgit2 to know that the human-user requested? Or does it get written to a file for git to be quiet if the human-user switches between them?