cork_strndup should copy entire string

The `cork_strndup` and `cork_xstrndup` functions were using `strncpy` under the covers to make the copy of the incoming string.  This truncates the copy at the first NUL byte.  We want to copy the whole thing, so we should use `memcpy` instead.