app: port gimp_palette_load_detect_format() to GIO