Add attributes to `std.socket`

`std.socket` now has `@safe` public API.

Also added few fixes.
Hmph, this is starting to make me wonder if extern(C) / extern(C++) functions should be `@nogc nothrow` by default, esp. OS API functions, since they can't possibly know anything about D's GC or how to throw a D exception. Unless they take a D callback.