make multipart uploading more robust

This patch fixes a number of subtle bugs found when testing multipart
uploads in various conditions.

 * Prevent MalformedXML error due to trying to complete a multipart
   upload before all parts are done uploading.
 * Fix incorrect progressAmount reported when a uploadPart operation
   fails on S3's end and must be retried.
 * Fix various error conditions not handled correctly.
 * Avoid overwriting the parameters object we give to uploadPart.
 * Fix MultipartETag always returning true when asked if a given ETag
   matches.