Add progress callbacks to download and upload methods

It is useful to provide progress updates during an upload or a download, as well as to allow the user to cancel a transfer in progress. This pull request adds new APIs for upload and download that are called periodically with the number of bytes transferred and allow the delegate to cancel the transfer.