curl: Do not call curl_easy_perform in a loop.

It is not necessary to use a loop here.  Calling curl_easy_perform
once is enough.

See this posting on the curl-library mailing list:
http://curl.haxx.se/mail/lib-2014-06/0222.html

Thanks: Dan Fandrich
curl: Add write support.

Thanks: Daniel Stenberg