removing old amis from database before saving the new one
Giving some brains to remove_old function.

Now it removes all records that have the same instance_ids and different
image_ids from the current taken. This allows remove_old to be run after
save_current, so, if there is an error in save_current, the old images
won't be removed from the database.