Call OPENSSL_cleanup() when shutting down
The OPENSSL_cleanup() cleans the OpenSSL allocated resources explicitly instead of relying on the atexit mechanism to do the cleanup. This is needed in case that we want to use custom allocator to manage OpenSSL memory.