Refactor init and error handling code

Move common ffi initialization code to 'ffi::init()' and the initialization of error handling to a
a shared location.
Merge pull request #79 from jroesch/init-cleanup

Refactor code around initialization and error strings.
Better thread working

Works pretty stable for me, although I'm not sure it is 100% thread safe yet.

Changes mostly inspired by https://www.arangodb.org/2014/07/08/started-hate-openssl :

- Switched to newer CRYPTO_THREADID API for Unixes

- Clearing errors queue before every critical operation
Simplified SslStream.write, updated comments
Locking internal buffer from same thread access

If cloned stream was used in the same thread
WIP: erase later