Prevent infinite loop loading config files.

PR#2985
(cherry picked from commit 9d23f422a32cb333a5e803199ae230706b1bf9f5)
sha[1|512]-x86_64.pl: fix logical errors with $shaext=0.
(cherry picked from commit 07b635cceb60abaddba2f0e469e5f5978258f46b)
apps/speed.c: fix compiler warnings in multiblock_speed().
(cherry picked from commit c4f8efab34af95a5319bbc5b954b62614604298a)
Please Clang's sanitizer.

PR: #3424,#3423,#3422
(cherry picked from commit 021e5043e524b1cb28a929ef902548a987c16e65)
Please Clang's sanitizer, addendum.
(cherry picked from commit d11c70b2c2a655d112fa72d34c6702e9aa2eff79)
x86_64 assembly pack: improve masm support.
(cherry picked from commit 1b0fe79f3ee27ebd20510da3af9ec04c6ee0f800)
Fix memory leak in BIO_free if there is no destroy function.
Based on an original patch by Neitrino Photonov <neitrinoph@gmail.com>

PR#3439

(cherry picked from commit 66816c53bea0ecddb9448da7ea9a51a334496127)
Merge OpenSSL_1_0_2-stable into 1.0.2-chacha

Conflicts:
	crypto/sha/asm/sha1-x86_64.pl