str_replace: self should not be shared and nofree
String#clear: use String#replace to simple
Merge pull request #2389 from ksss/str-mem-leaks

Fix memory leaks in String