Export PatchFromBuffers function.

This change also factor out diffOptionsToC function to remove
duplicated code.
Merge pull request #148 from joseferminj/export-patch-from-branches

Export PatchFromBuffers function.
Add missing thread-locking
Remove useless includes
Update to master

This deprecates the Push struct in favour of Remote.Push()
Add the new callbacks for Remote.Push()

This unifies the types with the Push struct, in preparation for its
deletion.
Merge pull request #154 from libgit2/cmn/update

Update to master
Update libgit2

Fix calls to C.git_treebuilder_create and C.git_treebuilder_write.
Add missing return type
heed DiffOptions fields OldPrefix and NewPrefix