Add attributes to `std.socket`

`std.socket` now has `@safe` public API.

Also added few fixes.
It's `@trusted`, not `nothrow`. `writefln` is just a `@system` function.