Do not commit to the DB empty rows
If there are existing overrides and we're resetting both of them, then
delete the entire record.
If there are no existing overrides, check that we are creating one before
creating a new record.
Adjust tests to make sure this is the behavior that we have.
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>