SSLEngine.beginHandshake() should throw SSLException after it was closed
During testing conscrypt in the netty testsuite we encountered that Conscrypt does not correct implement SSLEngine.beginHandshake().

See https://github.com/netty/netty/pull/10211/files#diff-08da41869dfc1d842df441440b1c605bR2084

If you call `beginHandshake()` after the engine was closed it must throw an `SSLException`. At the moment it throws an `IllegalStateException`.

See also https://docs.oracle.com/javase/7/docs/api/javax/net/ssl/SSLEngine.html#beginHandshake()

diff --git a/common/src/main/java/org/conscrypt/ConscryptEngine.java b/common/src/main/java/org/conscrypt/ConscryptEngine.java
index f1eedcc7..8df11b5b 100644
--- a/common/src/main/java/org/conscrypt/ConscryptEngine.java
+++ b/common/src/main/java/org/conscrypt/ConscryptEngine.java
@@ -413,7 +413,7 @@ final class ConscryptEngine extends AbstractConscryptEngine implements NativeCry
             case STATE_CLOSED_INBOUND:
             case STATE_CLOSED_OUTBOUND:
             case STATE_CLOSED:
-                throw new IllegalStateException("Engine has already been closed");
+                throw new SSLHandshakeException("Engine has already been closed");
             default:
                 // We've already started the handshake, just return
                 return;
['common/src/main/java/org/conscrypt/ConscryptEngine.java']