curl tool: reviewed code moved to tool_*.[ch] files

my_setopt and my_setopt_str no longer ignores curl_easy_setopt result.

Fixed some OOM handling issues.
12 files changed