NETLIB_SSL_CLOSE should make use of NETLIB_SSL_SHUTDOWN to clear the I/O queue and notify queued ASTs correctly, before finally removing everything.