Support SerializeObjectState for System.Exception (bug #39824)
Per current .NET, exception serialization may be implemented using the
SerializeObjectState event. Use of this approach is mandatory for
certain classes, such as HttpRequestException subclasses. Mono does
not support it. The solution is to switch out our System.Exception
implementation for the referencesource one.
To accommodate this, classes that access System.Exception internal
fields directly must switch to the new field names; a new support
method is added to System.Environment; the "security level" methods
and icall are added to MonoCMethods; and the field order in
_MonoException must be adjusted. A new test is also added in the
System.Runtime.Serialization assembly.