Add removesKeysWithNullValues setting to serialization and copying.

Preserve removesKeysWithNullValues through copying and serialization.
Merge pull request #2162 from jshier/master

Add removesKeysWithNullValues to serialization and copying.