Allow network operations to cancel

There is currently no way to cancel a clone operation in progress.  This PR changes the signature of the network-transfer progress callback so that it can cancel the transfer by returning a less-than-zero value. This also allows cancellation of a fetch.

Fixes #1310.