Add support for OpenSSL 1.1.x.
The API and ABI is not backwards-compatible. This is based on the prerelease version 1.1.0-pre5. It should continue to work with older versions of OpenSSL. Thanks to Ron Lee and the Debian project for reporting the build errors and testing the patch.