lib/libcrypt: unbundle hash functions
libcrypt bundles the various hash functions it needs,
duplicating code that is also found in libmd.
Unbundle the hash functions and apply the same hack used
for libncursesw so static consumers link -lmd in addition
to -lcrypt.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D47062