Added missing support for a diff against workdir or an index. The latter one differs from `git diff HEAD` because git itself does a merge of workdir and index (see docs of git_diff_workdir_to_tree).