Fix #66942 #66952: openssl_seal(), openssl_open() memory leak

Related to the bug https://bugs.php.net/bug.php?id=66942 I reported a couple of days ago.

A similar memory leak in openssl_encrypt()  (https://bugs.php.net/bug.php?id=54060) has been fixed by calling EVP_CIPHER_CTX_cleanup() once.  But here we need to call it twice because the variable ctx is reused.

Also fixed the memory leak in openssl_open(). https://bugs.php.net/bug.php?id=66952