Optimed MD5 calculation to be blockwise as bytewise operation is slow

I've been working with quite big files and found that the bytewise operation on IOStreams is quite slow. I here submit a block wise operation on IOStreams.

I submit this for both master and the 2.x branch; it would be nice if there would be a release of the 2.x branch at some time (despite the new version 3.0)

Br Alexander.