Fix uniqueness constraint on image_members table.

Fixes bug #1098700.

Previously, deleting then re-creating an image member failed with
500 ServerError due to the registry service failing to commit
the update to the image_members table.

The problem arose because the declared uniqueness constraint on that
table only spanned the image_id and member columns, but did not take
into account that deleted rows are left in situ with the deleted_at
and deleted columns set as appropriate. Hence the unique constraint
was violated by the addition of the new row.

We modify the uniqueness constraint via a migration script to take
account of the deleted_at column also (NULL for live memberships).

Note that the new ability to recreate an image membership cannot be
be asserted in a functional test, as these tests are based on sqlite
which does not support 'ALTER TABLE DROP CONSTRAINT'.

Change-Id: I175801ba95ecd9295791bb12e9096f59efa19c02