Closes the connection. The pcb is deallocated by the TCP code after a call to tcp_close().
The function may return
ERR_MEM if no memory was
available for closing the connection. If so, the application should wait and
try again either by using the acknowledgment callback or the polling
functionality. If the close succeeds, the function returns