Fixes #15028: Make DataContractJsonSerializer honor EmitDefaultValue during serialization.

This should work for both reference and value types. Together with tests (thanks to Jon Goldberger).
This method is simpler if the null check is at the beginning:
```csharp
if (obj == null)
   return true;

Type runtimeType = obj.GetType();
object defaultValue = runtimeType.IsValueType ? Activator.CreateInstance (runtimeType) : null;
return obj.Equals (defaultValue);
```