All the staticipaddress foreign key constraints are now taking into
account.
LP #1817305: Remove duplicate null ip records for the same interface and subnet Edit
This cleans up the data mostly, so that we don't have 10s of thousands
redundant records in the database slowing things down.
This patch doesn't handle the case where there are multiple interfaces
sharing the same ip address records, but only a few redundant records
should remain, so they won't affect performance.
LP #1817056: StaticIPAddress records with NULL ip keeps adding up
When the update_lease() RCP method gets called for an expired
lease, it adds a null IP record so that the interface stays linked to
the subnet. It didn't re-use existing such records, though.