Unit/regression test for TLS heartbeats.

Regression test against CVE-2014-0160 (Heartbleed).

More info: http://mike-bland.com/tags/heartbleed.html

(based on commit 35cb55988b75573105eefd00d27d0138eebe40b1)
Merge branch 'mbland-heartbeat-test-1.0.2' into OpenSSL_1_0_2-stable
Fix a wrong parameter count ERR_add_error_data
Adding padding extension to trace code.
(cherry picked from commit 6db14dbc514d6b8017827baebea4c75af8bb1976)
For portability use BUF_strndup instead of strndup.
(cherry picked from commit dcca7b13e9066443237dd3001ae52fd103151c98)
Don't allocate more than is needed in BUF_strndup().
Fix signed/unsigned warning.
Change default cipher in smime app to des3.

PR#3357
(cherry picked from commit ca3ffd9670f2b589bf8cc04923f953e06d6fbc58)
Fix for PKCS12_create if no-rc2 specified.

Use triple DES for certificate encryption if no-rc2 is
specified.

PR#3357
Fixes to host checking.

Fixes to host checking wild card support and add support for
setting host checking flags when verifying a certificate
chain.
(cherry picked from commit 397a8e747dc3f964196caed5ca4e08d4b598362a)
Implement BUF_strnlen() and use it instead of strlen().
Remove redundant test.
Fixed unterminated B tag, causing build to fail with newer pod2man versions
Fixed minor copy&paste error, and stray space causing rendering problem
Check length first in BUF_strnlen().
Fix heartbeat_test for -DOPENSSL_NO_HEARTBEATS

Replaces the entire test with a trivial implementation when
OPENSSL_NO_HEARTBEATS is defined.
vpaes-ppc.pl: comply with ABI.
(cherry picked from commit b83d09f5528990364e0f7ed498eb8a9b56d95b58)
Only copy opensslconf.h at init time.
Fixed error in args for SSL_set_msg_callback and SSL_set_msg_callback_arg