consensus: guard against openssl's new strict DER checks
consensus: guard against openssl's new strict DER checks

New versions of OpenSSL will reject non-canonical DER signatures. However,
it'll happily decode them. Decode then re-encode before verification in order
to ensure that it is properly consumed.

Github-Pull: #5634
Rebased-From: 488ed32f2ada1d1dd108fc245d025c4d5f252783

Conflicts:
	src/key.cpp

cherry-picked:
https://github.com/bitcoin/bitcoin/commit/b8e81b7ccd4490155e3345fc73346ff8c3a77524
https://github.com/bitcoin/bitcoin/commit/60c51f1c381bbd93c70cfdf41c6688609a7956fc
https://github.com/bitcoin/bitcoin/commit/037bfefe6bccbdf656e628a1f4526db8f80c3922

dexX7/mastercore,mastercoin-MSC/mastercore,mastercoin-MSC/mastercore,dexX7/mastercore,dexX7/mastercore,dexX7/mastercore,mastercoin-MSC/mastercore,mastercoin-MSC/mastercore,mastercoin-MSC/mastercore