libkern: strdup.c, strndup.c: Prefer memcpy() over bcopy()
The newly allocated memory can not overlap with the string if the string
is properly null-terminated or the maxlen is a valid lengh, i.e no out
of bounds reads. Prefer memcpy() over memmove(), aka bcopy(), for slight
performance gain.
No functional change intended.
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D49026
(cherry picked from commit 90a3b6a7a4e4c8201ba1bb90fb8e2b088f3a5788)