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!
This takes a `git_merge_head` because - like merge - you can rebase all sorts of things onto other things like refs onto commits specified by ID, etc, and the behavior is different.  (For example, conflict markers in diff files; it's much nicer to see that a change was introduced in 'master' instead of the ID).  So I like using a type that can encapsulate "what the user wanted".

That being said, it might make sense to change the name of this type if we're going to use it for more than just merge.