Allow digest operations to work in FIPS mode

FIPS mode is enabled by defining FIPS_SUPPORT at compile time and is currently
always on. The non-FIPS hashing algorithms are disabled and return badarg. The
rest of the hash functions are rewritten to use the EVP interface (when
compiled in FIPS mode, not otherwise to avoid the unnecessary overhead).

Using the EVP interface raises similar issues with context copying as in
commit 651b949. However, since FIPS mode require OpenSSL 1.0.1 backward
compatibility with 0.9.8 is not an issue here, so we are free to provide a
functional interface by context copying.