Refactor crypto_digest.c to have fewer ifdefs

Our current crypto_digest.c is a maze of twisty little ifdefs, and OpenSSL keccak support in #28837 (moved) will make it even more so. We ought to refactor it so that it's less idiosyncratic.

Possibly we should take the same approach as in the other crypto_ops modules, and divide it into an OpenSSL portion, a NSS portion, and a common portion.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information