curl: Split out the libcurl handle from the plugin handle
In a future commit we will create a pool of libcurl handles. In order
to prepare for that, split out the libcurl handle and associated
fields and buffers, from the plugin handle. The plugin handle (for
the moment) contains a pointer to the libcurl handle so there is still
a 1-1 relationship between them.
This is mostly just refactoring/renaming, except for the callback and
scripts functions. The callback functions (read_cb etc) only operate
on libcurl handles, so pass the libcurl handle (not the plugin handle)
as the opaque parameter. The scripts also only care about libcurl
handles, so pass the libcurl handle to do_scripts.