Register delegate to get callbacks about the CURL transfer

Property definitions

curl $ NativeCurl :: register_callback_body
	# Register `delegate` to get callbacks about the CURL transfer
	fun register_callback_body(delegate: NativeCurlCallbacks): CURLCode
	import CString.native_callback_body `{
		CURLcode e;
		NativeCurlCallbacks_incr_ref(delegate);

		e = curl_easy_setopt(self, CURLOPT_WRITEFUNCTION, (curl_write_callback)&CString_native_callback_body);
		if(e != CURLE_OK) return e;

		e = curl_easy_setopt(self, CURLOPT_WRITEDATA, delegate);
		return e;
	`}
lib/curl/native_curl.nit:217,2--228,3