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.
I didn't notice this one until today. What is the rationale for this change? Also, this would be a good time to stick it in a constant.