docker: refactor download method exception handling
docker: refactor download method exception handling

Split off code which rolls back and deletes files when
download fails.

Signed-off-by: Daniel P. Berrange <bb938cf255e055ff3507f2627d214e8e62118fcf@redhat.com>

agx/libvirt-sandbox-debian,agx/libvirt-sandbox-debian,libvirt/libvirt-sandbox,agx/libvirt-sandbox-debian,libvirt/libvirt-sandbox,agx/libvirt-sandbox-debian,libvirt/libvirt-sandbox,agx/libvirt-sandbox-debian