image-delete fires multiple queries to delete its child entries

1. Changed individual query calls for soft-deleting the image's
   child entries to one db query call for all child entries of a
   given type.
2. Added a fix to simple db's 'image_destroy' api to clear
   the location entries.

Fixes bug 1201758

Change-Id: Ib673de5460d59ea3af74553048ffcf74dccbdc36
Merge "image-delete fires multiple queries to delete its child entries"