Add wmempcpy

This function is used by elfutils and optionally by tar.
Implement qsort_r

Also write qsort in terms of qsort_r
Fix dn_comp prototype and add stub

This function is used by ping6 from iputils.
Fix dn_expand pointer following
getifaddrs: Simplify list creation
getifaddrs: Use sysfs to query *all* network interfaces
getifaddrs: Just use strcpy

The destination size is the same as the source size.
getifaddrs: Add AF_PACKET interface addrs
openlog: Support SOCK_STREAM
shadow: Move spent parsing to internal function
shadow: Implement sgetspent
shadow: Implement putspent