Merge File API + Updates to support new libgit2 git_merge API

This is an initial stab at how we might integrate the new merge file API from @ethomson (libgit2/libgit2#2140). It isn't tested and is purely for discussion purposes. Also, the libgit2 API is still in flux anyway. Thoughts? cc/ @arthurschreiber