bind automatically and set socket to nonblocking. Add testcode.
set also the accepted sockets to nonblocking
fix leaks, close handling and things.