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.
Okay, I see. Last thing to check is if it allocates closure (by peeking at the asm generated), it shouldn't but just to be one the safe side because people would tear us to pieces if say writeln starts allocating.