plug-ins: fix #7613 overwrite export creates thumbnail when it shouldn't
When overwriting the same file when exporting, we didn't check if the image previously had a thumbnail. If the default setting in Preferences is to add a thumbnail, then it would add one where it shouldn't. Since thumbnails get saves as part of the EXIF metadata, we need to check that to see if there was a thumbnail in the original image. However, we were always removing the thumbnail from the metadata on import. Let's delay removing this metadata until we need to, which has the advantage that the metadata in our viewer is more complete. When exporting starts, we add a check in gimp_image_metadata_save_prepare to see if there was a thumbnail in the EXIF metadata. If not, then we disable the thumbnail flag. In gimp_image_metadata_save_filter we remove the thumbnail metadata when the user doesn't want to save a thumbnail, or when the image format does not support EXIF.