Port CoreCLR's TypeNameBuilder to C#, and use it in Mono too (#33701)
* Port CoreCLR's TypeNameBuilder to C#, and use it in Mono too
Mono's System.Reflection.Emit creates type names that fail to be normalized or shaped in all ways that CoreCLR does.
Port CoreCLR's mixed-mode thread-unsafe implementation to thread-safe C#, and start using it in Mono for names in TypeBuilder.
Fixes issues with e.g. null-delimited type names being passed to different Reflection.Emit builders. Contributes to https://github.com/dotnet/runtime/issues/2389.