Allow aborting the pack writing operation
Allow aborting the pack writing operation

In case of an error in the writer, the packbuilder will stay around
waiting for someone to read from its channel. The state associated
with a packbuilder is non-trivial and it will keep a reference to the
object, so the GC won't be able to free it.

Change the ForEach interface to also return a "stop" channel. Closing
the channel or writing into it will cause the first receive clause to
act, making the callback to return -1, aborting the operation and
ending the goroutine, freeing its hold on the packbuilder.

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