change server_ai to a global variable

So the client can connect to server when create_link() is called.
add ssredirect
add debug
add server sockfd to poll before connect

This is more reasonable.
remove unneeded code
be more paranoid
fix poll set error

Poll_add should be used here, or the server data sent to us is
missing.