FIX DownLoadImage when remote site need more headers

see http://forum.team-mediaportal.com/posts/1098788 for complete description and solution. I suggest also trying DownLoadImage as a function and not as a void procedure in order to evaluate the result returned. Unfortunately, synchronous downloads are often problematic, so it is necessary to correctly handle errors.
First fork ;)