In preparation of the addition of support for FNV-1a checksums, clean up
the existing svn_checksum_t implementations for MD5 and SHA1.

This includes eliminating duplicate digest conversion and matching code.
Also, make the API implementation and test code much more generic to
make it simple to add more checksum kinds.  As a result, the sha1.*
files as well as md5.h are are obsolete now.

* subversion/libsvn_subr/checksum.h
  (): new file
  (svn__empty_string_digest,
   svn__digest_to_cstring_display,
   svn__digest_to_cstring,
   svn__digests_match): declare new, generic replacements of the similarly
                        named MD5 / SHA1 functions

* subversion/libsvn_subr/checksum.c
  (md5_empty_string_digest_array,
   sha1_empty_string_digest_array): declare empty digests taken from former
                                    specific implementations
  (empty_string_digests,
   digest_sizes): constants addressable by checksum kind
  (DIGESTSIZE): switch definition to ranges instead of enumeration
  (MAX_DIGESTSIZE): new definition
  (svn__empty_string_digest,
   svn__digest_to_cstring_display,
   svn__digest_to_cstring,
   svn__digests_match): implement taking previous copy-n-paste code
  (svn_checksum_create,
   svn_checksum_match,
   svn_checksum_to_cstring_display,
   svn_checksum_to_cstring,
   svn_checksum_dup,
   svn_checksum_empty_checksum,
   svn_checksum_is_empty_checksum): simplify using the new generics
  (svn_checksum_serialize): check for valid range instead of individual kinds

* subversion/libsvn_subr/md5.c
  (svn_md5__empty_string_digest_array,
   svn_md5__empty_string_digest,
   svn_md5__digest_to_cstring_display,
   svn_md5__digest_to_cstring,
   svn_md5__digests_match): drop MD5-specific code & definitions
  (svn_md5_empty_string_digest,
   svn_md5_digest_to_cstring_display,
   svn_md5_digest_to_cstring,
   svn_md5_digests_match): implement in terms of the new generic functions

* subversion/tests/libsvn_subr/checksum-test.c
  (checksum_parse_kind): factored out generic part of ...
  (test_checksum_parse): ... this one
  (test_checksum_empty): replace unrolled code with loop over checksum kinds
  (zero_match_kind):  factored out generic part of ...
  (zero_match): ... this one; restrict to single checksum types
  (zero_cross_match): new test covering the cross-kind checks
  (test_funcs): register new test

* subversion/libsvn_subr/cache-membuffer.c
  (): remove unneeded #include

* subversion/libsvn_subr/md5.h,
  subversion/libsvn_subr/sha1.c,
  subversion/libsvn_subr/sha1.h: drop


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/log-addressing@1515049 13f79535-47bb-0310-9956-ffa450edef68