add socket C API
add getpeername getsockname getsockopt setsockopt
add types
Add tests:

* parse a specific URI
* encode/decode an arbitrary URI
replace old style haskell to new layout based.

misc cleanup