tcp: add reference to conn for app

drop that reference in disconnect()
Also, queue the listening socket on the passive queue instead of
connected conns because the app never has a reference to it and
the conns queue should have 2 references (one for the list and one
for the app).
tcp: improve connection reference holding

Also, only call getsockopt() on ACTIVE1 and POLLOUT.