Changing the data structure from string list + hash table to a list of KisSwatchGroup. This would make the logic in this class clearer and more efficient.
There is also minor interface change in KisPaletteModel, KisPaletteView and KisDlgPaletteEditor, as KoColorset now has a getGroups() method which is clearer than the original getGroupNames() method.
Also, fixed 2 issues related to file I/O of the palette.
One is that Krita crashes if a palette file it wants to load is corrupted. It is changed so that Krita aborts loading that file instead of crashing.
The other is that Krita would fail to store a kpl palette if multiple color profiles used in this palette are from one same profile file. This is fixed by saving one profile file only once.