Ensure cancelling a download is done in the same thread it started

This prevent Qt to crash with "Cannot send events to objects owned by a different thread."

Fixes #11663