[openssl] fix openssl1.0 crash by implementing documented locking callbacks
openssl < 1.1.0 do not support natively multithread applications and need
some extra help from the application itself to provide locking callbacks.
https://www.openssl.org/docs/man1.0.2/crypto/threads.html
https://www.openssl.org/blog/blog/2017/02/21/threads/
to test this fix is necessary to use knet_bench or corosync with openssl
and lots of heavy load (perf benchmark) workload. Sooner or later
the application will crash with some random tracebacks.
after this patch, the crash cannot be reproduced anymore.
tested using 9 nodes x2 active/active links all running corosync + cpghum
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>