SOC_U: Implemented some socket functions

This allows ftpony and ftbrony to work.
It's using Berkeley sockets directly since that's what the soc:U service exposes to applications.
Meh, I guess :p 

I like keeping the count of named types minimal and got used to stuff like declvar, but that's probably personal taste.