Provide openssl with a locking callback using Semaphores.

In order to be thread safe, openssl needs to be provided with a
callback that it will call to doing locking around its data
structures. Doing this should mean a lot fewer random crashes.
Merge pull request #25 from eve-val/locking-fix

Provide openssl with a locking callback using Semaphores.