various String (sharedptr trick based) thread safety fixes