Make std.stdio.LockingTextWriter.put and lockingTextWriter @safe

We can mark `std.stdio.lockingTextWriter` as safe because the constructor of `LockingTextWriter` is safe.

`LockingTextWriter.put` for ranges uses `core.stdc.stdio.fwrite` but we can verify it can be trusted.
`LockingTextWriter.put` for char type uses `FPUTC` and `FPUTWC` but we can verify they can be trusted.
I define nested trusted functions for them.
> Last thing to check is if it allocates closure (by peeking at the asm generated), it shouldn't

For this purpose, it will be better to make them static functions. Static functions will keep the posibility for `@nogc` but closures will not.