Improved downloadmanager

Improved downloadmanager to support relocation, better filename
handling, optional download to QByteArray instead of a file and
authentication.
Little bit of cleanup.