Fix heartbeat_test for -DOPENSSL_NO_HEARTBEATS

Replaces the entire test with a trivial implementation when
OPENSSL_NO_HEARTBEATS is defined.
Fix for non compilation with TLS_DEBUG defined
Fixed error in args for SSL_set_msg_callback and SSL_set_msg_callback_arg
Fixed Windows compilation failure
Fix for test_bn regular expression to work on Windows using MSYS. PR#3346
remove duplicate 0x for default RSASSA-PSS salt len
(cherry picked from commit 3820fec3a09faecba7fe9912aa20ef7fcda8337b)
Fix memory leak.

PR#3278
(cherry picked from commit de56fe797081fc09ebd1add06d6e2df42a324fd5)
Set version number correctly.

PR#3249
(cherry picked from commit 8909bf20269035d295743fca559207ef2eb84eb3)
add description of -no_ecdhe option to s_server man page

While the -help message references this option, the man page
doesn't mention the -no_ecdhe option.
This patch fixes this omission.
add description of -attime to man page

the verify app man page didn't describe the usage of attime option
even though it was listed as a valid option in the -help message.

This patch fixes this omission.
Don't compile heartbeat test code on Windows (for now).
(cherry picked from commit 2c575907d2c8601a18716f718ce309ed4e1f1783)
Use correct digest when exporting keying material.

PR#3319
(cherry picked from commit 84691390eae86befd33c83721dacedb539ae34e6)
Initialise alg.

PR#3313
(cherry picked from commit 7e2c6f7eb01515a990f77fbc5441be8e1a17152a)
Allocate extra space when NETSCAPE_HANG_BUG defined.

Make sure there is an extra 4 bytes for server done message when
NETSCAPE_HANG_BUG is defined.

PR#3361
Set default global mask to UTF8 only.
(cherry picked from commit 3009244da47b989c4cc59ba02cf81a4e9d8f8431)
Option to disable padding extension.

Add TLS padding extension to SSL_OP_ALL so it is used with other
"bugs" options and can be turned off.

This replaces SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG which is an ancient
option referring to SSLv2 and SSLREF.

PR#3336
Recognise padding extension.
(cherry picked from commit ea2bb861f0daaa20819bf9ac8c146f7593feacd4)

Conflicts:

	apps/s_cb.c
(cherry picked from commit 14dc83ca779e91a267701a1fb05b2bbcf2cb63c4)
Delays the queue insertion until after the ssl3_setup_buffers() call due to use-after-free bug. PR#3362
Added SSLErr call for internal error in dtls1_buffer_record
Typo: set i to -1 before goto.

PR#3302
(cherry picked from commit 9717f01951f976f76dd40a38d9fc7307057fa4c4)