CURL-related fixes and more

A bunch of CURL-related fixes, small optimizations and some CStdString removal
@jmarshallnz ?
Because it was incorrect.
`C:\Windows\Temp` is incorrect path for POSIX as well as `/home` is not full path for Win32.