When overwriting, remove the file. Curl tries to continue otherwise.
curl: Work around a race where the download thread accesses freed memory
curl: Small optimization
curl: Work around another webkit idiosyncrasy

This one caused an assert to hit on exit when a download was still in progress.

The DL thread added http headers to the request - an object created by the main thread -
which then got deleted by the main thread as it should. At this point the header field
atomicstring yells because it was created in another thread than what deleted it.

Work around it by leaking the header map. Can't be deleted by the DL thread, as it doesn't
have access to the object, only to the curl handle.

The leak is 40 bytes per download.