Set thread id using the new callback API of openssl (fix for #82)

Use the new API to properly fix #82. Source: http://www.openssl.org/docs/crypto/threads.html
This should fix the cases with mangled/empty string in `error: no results found for`, duplicate `warning: <package> is available in <repo>` etc. (Usually observed on packages with multiple dependencies-threads)
Before and after screenshot to demonstrate: http://i.imgur.com/VgkXAIy.png