It was very confusing that only *after* a call to a libcurl function
it was written to debug output that it was called.
Now it prints it before calling it, and when that leads to additional
debug output while inside the function, it prints that before giving
the return value.
For example:
0x7f529ea15700 CURLTR : curl_multi_socket_action((CURLM*)0x7f528c002920, CURL_SOCKET_TIMEOUT, 0, <unfinished>
0x7f529ea15700 CURLIO 0xea8ef30 * About to connect() to login.agni.lindenlab.com port 443 (#0)
0x7f529ea15700 CURLIO 0xea8ef30 * Trying 216.82.16.97...
0x7f529ea15700 CURLIO 0xea8ef30 * 0xe3240e0 is at send pipe head!
0x7f529ea15700 CURLIO 0xea8ef30 * STATE: CONNECT => WAITCONNECT handle 0x7f528c001df0; (connection #0)
0x7f529ea15700 CURLTR : curl_easy_getinfo((CURL*)0xe3240e0, CURLINFO_PRIVATE, 0x7f529ea13db0) = CURLE_OK
0x7f529ea15700 CURL : Entering MultiHandle::socket_callback((CURL*)0xe3240e0, 36, CURL_POLL_OUT, 0x7f528c001508, 0) [CURLINFO_PRIVATE = 0xea8ef30]
0x7f529ea15700 CURLTR : curl_easy_getinfo((CURL*)0xe3240e0, CURLINFO_PRIVATE, 0x7f529ea13d58) = CURLE_OK
0x7f529ea15700 CURLTR : curl_multi_assign((CURLM*)0x7f528c002920, 36, 0x7f528c031680) = 0
0x7f529ea15700 CURL : CurlSocketInfo::set_action(CURL_POLL_NONE --> CURL_POLL_OUT) [0xea8ef30]
0x7f529ea15700 CURL : MultiHandle::timer_callback(): timeout set to 1 ms.
0x7f529ea15700 CURLTR : <continued> {1}) = 0
Unfortunately, this breaks defining DEBUG_CURLIO without using libcwd,
but that was unusable already anyway (even though it compiled).
Add CURLTR debug channel for libcurl API calls,
and use CURLIO only for libcurl debug output.
Note: need to set gDebugCurlTerse to true for
filtering to take effect, then pass 'debug_on'
to the LLHttpClient methods that require debugging.