Auto retry if we ditch records during shutdown
Auto retry if we ditch records during shutdown

If we've sent a close_notify and we're waiting for one back we drop
incoming records until we see the close_notify we're looking for. If
SSL_MODE_AUTO_RETRY is on, then we should immediately try and read the
next record.

Fixes #6262

Reviewed-by: Bernd Edlinger <ac6902843ae77cc0d49b9c8ddec4cbf141db1bb7@hotmail.de>
Reviewed-by: Kurt Roeckx <bb87b47479d83cec3c76132206933257ded727b2@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/6340)

openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl