Set accept-encoding and handle gzip on-the-fly encoding.

 * Add test for copying a file with cp -z then downloading it.
 * Send "accept-encoding: gzip" only when downloading files so that
   "accept-encoding: identity" doesn't trigger gzip on-the-fly decoding.
 * Handle case where server gzips content not stored gzipped by checking hash
   digest again after decompressing.
 * No longer look for file names ending in .gz to indicate gzip encoding. Now
   properly only considers Content-Type and Content-Encoding.