[js] Optimize Std.string for basic types
[js] test for Std.string optimization
Merge pull request #2476 from nadako/js_std_opts

[js] Optimize Std.string for basic types