CURLcode
Before this patch, the result code was a mixture of `int` and `CURLcode`. Also adjust casts and fix a couple of minor issues found along the way. Cherry-picked from #13489 Closes #13600
CURLOPT_POSTFIELDSIZE
It requires a `long` argument. Closes https://github.com/curl/curl/pull/13085
- test POST fields with trailers and chunked encoding Ref: #12938 Closes #13009