make String::intern thread-safe
fix memory leaks
fix a cpplint warning