Update behaviors of new TextWriter StringBuilder overloads (dotnet/coreclr#18578)
Two issues addressed:
- CancellationToken was being ignored; the overloads should check whether cancellation was requested. This applies to the existing Write{Line}Async overloads that were added in 2.1.
- The other overloads support inputs (string, char[], etc.) being null, and just treat that the same as an empty string. We should do the same for StringBuilder rather than throwing.
Commit migrated from https://github.com/dotnet/coreclr/commit/
538a51e593964ad34147e3143153885135412837