bn_exp.c: move check for AD*X to rsaz-avx2.pl.

This ensures high performance is situations when assembler supports
AVX2, but not AD*X.
(cherry picked from commit f3f620e1e0fa3553116f0b3e8c8d68b070fcdb79)

Resolved conflicts:

	crypto/bn/asm/rsaz-avx2.pl
Make sure BN_sqr can never return a negative value.

PR#3410
(cherry picked from commit e14e764c0d5d469da63d0819c6ffc0e1e9e7f0bb)
Remove ancient obsolete files under pkcs7.
(cherry picked from commit 7be6b27aaf5ed77f13c93dc89a2c27a42082db3f)
Memory leak and NULL dereference fixes.

PR#3403
(cherry picked from commit d2aea038297e0c64ca66e6844cbb37377365885e)
Clarify docs.

Document that the certificate passed to SSL_CTX_add_extra_chain_cert()
should not be freed by the application.

PR#3409
(cherry picked from commit 0535c2d67ca2d684087ef90be35d5fb207aab227)
Don't advertise ECC ciphersuits in SSLv2 compatible client hello.

PR#3374
(cherry picked from commit 0436369fccd128cb7f6a8538d5fed1c876c437af)
Fix OID encoding for one component.

OIDs with one component don't have an encoding.

PR#2556 (Bug#1)
(cherry picked from commit 95791bf94150f2e3dc96fd2462627aaf354e92e4)
Rebuild OID table.
Handle IPv6 addresses in OCSP_parse_url.

PR#2783
(cherry picked from commit b36f35cda964544a15d53d3fdfec9b2bab8cacb1)
Tolerate critical AKID in CRLs.

PR#3014
(cherry picked from commit 11da66f8b1fbe5777fe08cc6ace9e1f2c1576a50)
bn/asm/rsaz-avx2.pl: fix occasional failures.
(cherry picked from commit 406d4af050cff0f52c5435504186eaf03ca69698)
x86_64 assembly pack: allow clang to compile AVX code.
(cherry picked from commit ac171925ab527a55fbb27872ff69af94f7ec995b)
x86_64 assembly pack: addendum to last clang commit.
(cherry picked from commit 7eb048828008f195fb6edceb8f767622694e7426)
Fix for EVP_PBE_alg_add().

In EVP_PBE_alg_add don't use the underlying NID for the cipher
as it may have a non-standard key size.

PR#3206
(cherry picked from commit efb7caef637a1de8468ca109efd355a9d0e73a45)
Remove redundant check.

PR#3174
(cherry picked from commit fd331c0bb9b557903dd2ce88398570a3327b5ef0)
Fix typo in ideatest.c
(cherry picked from commit d1d4382dcb3fdcad4758ef7e7dd7b61dbf5abbfe)
Fix compilation with -DSSL_DEBUG -DTLS_DEBUG -DKSSL_DEBUG

PR#3141
(cherry picked from commit d183545d4589f1e7a40190400b8b99ea3d1f7f97)
Don't disable state strings with no-ssl2

Some state strings were erronously not compiled when no-ssl2
was set.

PR#3295
(cherry picked from commit 0518a3e19e18cfc441cab261b28441b8c8bd77bf)
Typo.

PR#3107
(cherry picked from commit 7c206db9280865ae4af352dbc14e9019a6c4795d)
x86_64 assembly pack: refine clang detection.
(cherry picked from commit a356e488ad50ca9de3fc4955839441c5aff11ed3)

Resolved conflicts:

	crypto/bn/asm/rsaz-avx2.pl