callcgi: Poll for response socket closing and kill CGI handler if so.