Check for integer overflow in vector_c?join

Check for integer overflow when determining the size of the results of
vector_join and vector_cjoin.
Avoid strlcpy in replacement functions

Avoid strlcpy in the getnameinfo replacement (use memcpy instead) and
the setenv replacement (use asprintf instead).