Set GenericForeignKey fields on object before save

* A model with a required GenericForeignKey can be saved if the field is set
Use setattr for adding fields to a new instance

Add test for restoring a GenericForeignKey
Merge pull request #1527 from Ian-Foote/generic_foreign_key

Set GenericForeignKey fields on object before save