Correct init mutexes and locking function

`libcrypto` uses locks quite intensively even without SSL. 
So they should be initialized before everything else to 
function properly in multi-threaded apps in which SSL 
operations are absent or delayed.

Finishes #79
Merge pull request #81 from vhbit/lock-init

Correct init mutexes and locking function