SecureSocket: add OpenSSL locking.

This shoiuld make OpenSSL more thread safe and help with the random
network related crashes in Web+ (and anything else using SecureSocket
with more than one thread).