Init cURL before threading to avoid race condition in SSL init

curl_easy_init() is not thread-safe unless curl_global_init() has
already been called. The result is that https: connections sometimes
fail saying
[2013-06-08 16:47:53] 1 miner threads started, using 'scrypt' algorithm.
[2013-06-08 16:47:53] HTTP request failed: SSL: couldn't create a context!
[2013-06-08 16:47:53] json_rpc_call failed, retry after 30 seconds
See http://curl.haxx.se/libcurl/c/curl_easy_init.html
and http://code.google.com/p/gambas/issues/detail?id=236

It seems that SSL init is slow on Windows, so only do that if SSL is used
See https://groups.google.com/forum/?fromgroups#!topic/msysgit/ZAOYvIuqxyU