Return a new EVP_PKEY from InternalToEvp()

For asymmetric keys, move the allocation of the EVP_PKEY into the
InternalToEvp() method.

(This is needed for Ed25519 keys, because OpenSSL has no entrypoint that
allows an already-existing EVP_PKEY to be populated with Ed25519 key
data.)

Test: TreeHugger
Bug: 194358913
Change-Id: Ib136b59478bbdd69b6c54c720816875d25425928
13 files changed