Avoid loading a ref from SQL to delete the ref

In the mapping_backend there is no need to load the ref just to
issue a delete, it can be handled as a single SQL query.

Change-Id: I4cec4fe5de4530d8da79e3be10e2d8fe431ed1f1
Merge "Avoid loading a ref from SQL to delete the ref"