Add epoll event handlers only after connect/listen calls

Otherwise, you might get EPOLLHUP sometimes, indicating the socket state
before the connect/listen call.

Change-Id: Id6232af471da8d3166e03b6119d0c1c2d6277204
Signed-off-by: Or Kehati <ork@mellanox.com>