Add support for withCredentials in CFHTTPRequest and CPURLConnection

This is a consolidation of PRs #2141 and #2138.

Previously CFHTTPRequest and CPURLConnection did not accept the withCredentials setting, which made it difficult to perform XHTTPRequests sending along credential information such as cookies. For more information on withCredentials, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS

These commits add support for `withCredentials`.

All credit for these goes to @mrbannon and @HMSimmonds.