Make bundle-and-upload release semaphores during teardown

This fixes deadlocking caused by partial failure during upload.