[LWIP] Use tcp_close when both shut_rx and shut_tx are set. Fixes CORE-16868 (#2582)