Pre-emptively copy data when marshalling diff callback data.
Pre-emptively copy data when marshalling diff callback data.

When marshalling diff callback data to Go structs, any `char*` need to
be pre-emptively copied onto Go's heap as they're invalidated as soon as
our callback function returns. This patch adds this extra copy before
sending the value to the channel, which fixes a bug wherein
`DiffLine.Content`, `DiffFile.Path` and `DiffHunk.Header` would
previously return garbage data.

hwjeong/git2go,clns/git2go,libgit2/git2go,TheDahv/git2go,AaronO/git2go,orivej/git2go,Acidburn0zzz/git2go,kissthink/git2go,michaeledgar/git2go,tiborvass/git2go,clns/git2go,sygool/git2go,joseferminj/git2go,ezwiebel/git2go,libgit2/git2go,clns/git2go,tiborvass/git2go,orivej/git2go,tiborvass/git2go,TheDahv/git2go,ezwiebel/git2go,treejames/git2go,TheDahv/git2go,pks-t/git2go,kissthink/git2go,pks-t/git2go,hwjeong/git2go,treejames/git2go,hwjeong/git2go,AaronO/git2go,clearr/git2go,joseferminj/git2go,clearr/git2go,ezwiebel/git2go,sygool/git2go,michaeledgar/git2go,treejames/git2go,clearr/git2go,orivej/git2go,joseferminj/git2go,Acidburn0zzz/git2go,libgit2/git2go