Prevent JavaScript error on cancel, fix #999
Don't retry on interrupted, fix #963
- Upload was still going on after a manual cancel because on cancel we
  were calling UploadServer.uploadFailure() which retries the upload,
  instead of UploadServer.cancel() which interrupts the upload.
- When the upload fails and we get an answer from the server,
  UploadServer.uploadSuccess is still called; we detect the response
  isn't legit (not a wrapped xxf:event-response), and
  UploadServer.cancel(), as if the user canceled it, but in that case
  we shouldn't abort the connection, as it has already been aborted.