Make std.range.putChar safe for some cases

`std.range.putChar` to put `const(char)[]` or to put `const(wchar)[]` uses unsafe pointer slicing but we can verify it can be trusted.