Register delegate to get callbacks about the CURL transfer

Property definitions

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

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

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