When project is deleted, check that it has no images

Change-Id: If661636d1e129b32ce0f53d74d94b94840f8da35