Added i to the shared variables. Changed the method to set the number of threads to be used.
Set the curl_easy_cleanup to be performed after the curl_easy_gerinfo.