Export PatchFromBuffers function.

Export PatchFromBuffers function and factor out diffOptionsToC function to remove
duplicated code in diff.go .