Add functions to use convert a string with length, instead of assuming
NUL termination.
In addition, move the utf8 to 16 conversion routines into the `git_utf8`
namespace instead of using namespaceless `git__` prefixed names.
Now that we've split the notion of the home directory from the global
configuration store, our tests should use the appropriate one based on
what they're doing.