New records should remain new after yaml serialization
Merge pull request #15444 from sgrif/sg-yaml-new-record

New records should remain new after yaml serialization
Refactor determination of whether the field has changed

The types know more about what is going on than the dirty module. Let's
ask them!