[Chapel Merge] Being able to set options easily on the curl_easy

Branch: refs/heads/main
Revision: db98314
Author: dlongnecke-cray
Log Message:

Merge pull request #18310 from cassella/curl-easy-2

Being able to set options easily on the curl_easy object is all that's
needed to be able to implement the sample libcurl POST programs in
Chapel with the Curl module. Add a curl_easy_setopt() wrapper that
uses the Chapel-to-C type manipulation that's done in the qio
channel-based code.

Add an example using it to the Curl module comment, and a test of
using the curl_easy_ interface to do a GET.

Add a compile-time check to setopt() for types that aren't valid for
any option.

Add a test of that check, and of a type mismatch that we can detect
only at run time.

Update a commented-out writeln for nilability, so that it'll compile
when uncommented.

Remove a few trailing spaces.

The first commit applies some fixes developed by hokiegeek2 in #18259.

[Reviewed and tested by @dlongnecke-cray.]

Modified Files:
A test/library/packages/Curl/check-http-setopt-badtype-dynamic.chpl

A test/library/packages/Curl/check-http-setopt-badtype-dynamic.good
A test/library/packages/Curl/check-http-setopt-badtype-static.chpl
A test/library/packages/Curl/check-http-setopt-badtype-static.good
A test/library/packages/Curl/check-http-setopt-badtype-static.prediff
M modules/packages/Curl.chpl
M test/library/packages/Curl/check-http-setopt.chpl
M test/library/packages/Curl/check-http-setopt.good

Compare: https://github.com/chapel-lang/chapel/compare/5588a711c864...db98314ecc42