Add attributes to `std.socket`

`std.socket` now has `@safe` public API.

Also added few fixes.
Does adding "in" to these function parameters actually change anything?