3c2b4ce544
Add queue-based background download system to improve performance and reliability: - Introduce DOWNLOAD_SEMAPHORE to limit concurrent downloads to 3 - Add asyncio.Queue (maxsize 100) with dedicated worker for background processing - Implement safe_get_messages and safe_download_media wrappers with timeout protection (30s and 120s) - Add retry logic for KeyError auth failures with 5s backoff - Replace synchronous sequential downloads with asynchronous queued processing - Prevent event loop blocking by queuing files instead of immediate download