Split SHA1 functions out into their own library

This is to facilitate re-use of the SHA-1 code elsewhere
in the app.

It also clarifies the licensing since only the SHA-1 code
in lib/crypto/sha1 is derived from Rusha as described
in the comments at the top of the file. The PBKDF2 code is not.