Remove unneeded includes in include
Use locking to ensure only one thread accesses curl at a time
Cleanup when done with gzinflate