A mariadb developer didn't like the fact that these structs need to be
allocated in OpenSSL 1.1 and added some insane hacks to work around
this. Adjust the code to cope with that the same way as it is done for
OpenSSL.
LibreSSL doesn't provide the means to override malloc and friends, so
the runtime check cannot be adapted. Use generous estimates for the
sizes for these structs instead.
With opaque EVP_CIPHER_CTX, EVP_CIPHER_CTX_buf_noconst() needs to be
provided by libcrypto, so disable this and a few other API redefinitions.