[WIP] add extra string handling functions

This is WIP, I'm just putting this in a PR so other people can look and give suggestions.

ref: #859
I did this for symmetry with `xstrlcpy`, and to be able to implement `xstrlcpy` as a special case of `xstrucpy`. Do you think we should do this differently?

Reference: http://www.freebsd.org/cgi/man.cgi?query=strlcpy&sektion=3