Use resource_id_set to clear resource ID's

self.resource_id = None is used in several resources, which is wrong,
we should be explicitly updating the resource_id in the DB via the
resource_id_set function.

Change-Id: I41e1326fe7e1da364c8e6dd68f572df484beffb3
Reverse assert arguments so the errors make sense

Change-Id: I2919db71019ee56246eb0398ddc0a3170f17e6b2
Merge "Use resource_id_set to clear resource ID's"