lib: string: move strlcpy() to a common place