curl_json: Add support for specifying a connection timeout