On the svn_auth_x509 branch: Implement functions that convert UTF-16 (UCS-2)
and UTF-32 big- and little-endian strings to UTF-8.

* subversion/include/private/svn_utf_private.h
  (svn_utf__encode_ucs4_string,
   svn_utf__utf16_to_utf8,
   svn_utf__utf32_to_utf8): New prototypes.
* subversion/libsvn_subr/utf8proc.c
  (svn_utf__encode_ucs4_string): Renamed from encode_ucs4_string.
  (svn_utf__glob): Update calls to encode_ucs4_string.
* subversion/libsvn_subr/utf.c
  (membuf_insert_ucs4): New private helper function.
  (SWAP_SHORT, SWAP_LONG): New macros for byte swapping.
  (IS_UTF16_LEAD_SURROGATE, IS_UTF16_TRAIL_SURROGATE): New macros.
  (svn_utf__utf16_to_utf8, svn_utf__utf32_to_utf8): Implement here.

* subversion/tests/libsvn_subr/utf-test.c
  (test_utf_conversions): New test case.
  (test_funcs): Add test_utf_conversions.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/svn-auth-x509@1613540 13f79535-47bb-0310-9956-ffa450edef68