change prevValue in NodeExtern from string to *string

add a test for setting empty value

add Clone() in string.go to explicitly copy the string