Support .xz compression for Sources files and improve error handling
This is needed because debian stable archives do no longer have Sources.gz but Sources.xz instead.
Also improve handling of network errors, so that error reasons don't become masked.