[2018-06] [System]: `HttpWebRequest` now throws `WebExceptionStatus.RequestCanceled` on abort. (#9294)
* [System]`HttpWebRequest` now throws `WebExceptionStatus.RequestCanceled` on abort. #9031.
Cleanup the internal `HttpWebRequest.RunWithTimeout()` function and use
`GetWebException()` everywhere to throw `WebException` with
`WebExceptionStatus.RequestCanceled` on abort.
New tests for this will be added to the web-tests by extending the existing
`Xamarin.WebTests.HttpInstrumentationTests.AbortDuringHandshake` to check the
synchronous and begin/end async APIs as well, using both `GET` and `POST`.
See https://github.com/xamarin/web-tests/blob/master/Xamarin.WebTests.Tests/Xamarin.WebTests.HttpInstrumentationTests/AbortDuringHandshake.cs.
Fixes #9031.
* Fix exception checks, setting `TransferEncoding` without `SendChunked` is supposed to throw `InvalidOperationException`.
* Fix the incorrect behavior in this test.
Backport of #9212.