Fallback to inferring image_members unique constraint name

Fixes bug 1160114

The initial version of the 022_image_member_index migration
hardcoded the default naming convention for unqiue constraints
used by PostgreSQL 9.2, which turns out to different to the
convention used by PostgreSQL 8.4. This causes the CI to fail
(non-voting) against RHEL.

We resolve the issue by falling back to inferring the existing
unique constraint name from the image_members indices.

Change-Id: Iad6db033e63cdfd7a77db44bdeaed2284699b469
Merge "Fallback to inferring image_members unique constraint name" into milestone-proposed