improving error handling in chunked upload

Keep traceback of chunked upload in a variable and raise it after
deleting orphaned data to avoid covering sys.exc_info().

fixed bug #1185609
fixed bug #1199125

Change-Id: If489f42bb97a01519d13de47eeb5d180b31ba6a7
Merge "improving error handling in chunked upload"