Fix removal of exif data for untouched images

It's a bad idea to work on the dt_image_t struct after the lock was
released. And syncing to db before reading the exif data doesn't help
either.