EVP: fix memleak in evp_pkey_downgrade()
EVP: fix memleak in evp_pkey_downgrade()

The EVP_KEYMGMT pointer in the pkey is removed when downgrading, but
wasn't necessarily freed when need, thus leaving an incorrect
reference count.

Reviewed-by: Matt Caswell <1fa2ef4755a9226cb9a0a4840bd89b158ac71391@openssl.org>
Reviewed-by: Nicola Tuveri <5a38b4ac03c90be61ead22c1d11b6e9f49425984@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/11328)

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