Checksums: use blocks to read the files

We need to read a file in blocks to calculate the checksum because else, the memory blows up if you try to install icc.

This PR fixes it for sha1 and md5 but not yet for addler32 or crc32. I will try to fix them when I find the time.