Use setattr for adding fields to a new instance

Add test for restoring a GenericForeignKey