if a .gz file is uploaded, calculate the hash based on the uncompressed contents

otherwise there would be an ambiguity between application/octet-stream files with gzip on-disk compression and application/gzip files with no compression, and they would appear to have different hashes, which would break replication