Fix add-on store downloads after cancellation (#20017)
Fixes #20015
Summary of the issue:
After cancelling an add-on download by closing the Add-on Store and choosing "Yes", the store can get into a bad state.
If the user opens it again and starts another download, NVDA can raise:
AttributeError: 'NoneType' object has no attribute 'submit'
Closing the store again after that can also raise:
AttributeError: 'NoneType' object has no attribute 'shutdown'
Description of user facing changes:
After cancelling a download, the Add-on Store can be used again normally.
Starting another download no longer throws those exceptions.
Closing the store again after that also works as expected.
Description of developer facing changes:
AddonFileDownloader now tracks state per download attempt.
This prevents an older cancelled worker from interfering with a later retry of the same add-on.
Description of development approach:
The fix updates the downloader so each download attempt has its own state and temporary file path.
After cancelAll(), the downloader can recreate its executor and be reused safely.
When a worker finishes, it now checks whether it still belongs to the active attempt before updating progress, cleaning up files, or completing the download.