Add git_diff_buffers and git_patch_from_buffers

This adds diff and patch functions parallel to the blob-to-blob and blob-to-buffer functions that just take in-memory buffers and either issue diff callbacks or generate a `git_patch` object.

This includes a ton of internal refactoring to reduce code duplication between the various code paths and in the tests, so even with the two new APIs we still get a net reduction in lines of code. :boom: