Add safer string_get_copy() function.

Also remove the const qualifier from the return value of string_get().
Modifying the string might useful occasionally, so don't imply it's
intrinsically unsafe.