app: add gimp_file_has_extension() and use it in GimpDataFactory