Add atomic guards using ManagedAtomic to ensure continuations are resumed
exactly once in TaskDelegate, downloadFileWithProgress, and unzipCoreMLFile
functions. This resolves crashes during model downloads and transcription
when multiple callback paths race to resume the same continuation.
Changes:
- Import Atomics framework for atomic operations
- Add ManagedAtomic guards to prevent double resume
- Implement finishOnce helper pattern for consistent error handling
- Add proper cancellation handling in downloadFileWithProgress
Fixes crashes with stack trace: EXC_BREAKPOINT → _assertionFailure →
CheckedContinuation.resume(returning:) → VoiceInk [0x102dbfcc4, 0x102dc1174]