memoize computeShard

Part of calculating the md5sum is `MessageDigest.getInstance()`, which
is a blocking operation. Memoizing computeShard stops us from calling
this too often and is a massive speed up.