downloads: Prefer the content type returned by the server

Instead of using the destination file. g_file_query_info() does
synchronous I/O, so use it only as fallback when the server response
doesn't include a content type header.

https://bugzilla.gnome.org/show_bug.cgi?id=721781