poll_tcp() function
Poll callback function for TCP netconns. Wakes up an application thread that waits for a connection to close or data to be sent. The application thread then takes the appropriate action to go on. Signals the conn->sem. netconn_close waits for conn->sem if closing failed. @see tcp.h (struct tcp_pcb.poll) for parameters and return value