gom: Mark resources as from table after it is inserted

Previously, if you create a new resource, then call
gom_resource_save_*(), then change some properties and call _save()
again, it will insert another item into the repository. With this
change, it will mark the resource as being from the table, so that the
next time save() is called, it was UPDATE, rather than INSERT.

https://bugzilla.gnome.org/show_bug.cgi?id=734029