The response object does not have all the cookie values, instead we must
rust the cookie storage which can be used to retrieve ALL the cookies
for a task.
The header value has to be created manually because the native objects
do not expose a valid way to get the header. Tests have been added to
ensure we return the same as the managed client.
Fixes https://github.com/xamarin/xamarin-macios/issues/5148
* Make it clearer when a timeout happens that a timeout happened by asserting
exactly that.
* Don't assert after getting the (unexpected) result from the network request,
since asserting will throw an exception, which will be caught and stored,
and then later in the test we assert that an exception was thrown. So
asserting just after a successful network request effectively hides any
failures, since we're now passing because of the assertion exception. Ops.
* Fix many version checks to be based on Xcode version instead of iOS version.
* Added/fixed a few expected values according to platform version to match behavior in older macOS versions.
Store strings in the exception data when converting CFError to CFException, to
make sure the data stored is serializable (which is apparently a requirement
with the reference sources).
https://bugzilla.xamarin.com/show_bug.cgi?id=46626