downloader: Write chunks to file instead of memory

This makes the downloader suitable for downloading large files and
additionally prevents that all downloaded data is hold in the memory
until the program terminates.

https://bugzilla.gnome.org/show_bug.cgi?id=733170
Fixing progressbar

Progressbar doesnt go back when first chunk is received before the headers are processed.