Fix interface changes due to libgit2 upgrade

* Most repository changing functions now need a signature
* Duplication functions i.e. git_signature_dup now return an error code
* libgit2's merge API has renamed some constants/options/flags