Difference between ACT, JASC and RIFF is the file format... ACT is for photoshop, JASC for irfanview and RIFF is for coreldraw I think. (Or any other programs able to use them of course.)
Difference between SAFE and "not SAFE" is that SAFE versions have reserved indices replaced with dummy colors.
For example transparent index is replaced with bright green; dynamic background colors are replaced by bright magenta, unused indices are also replaced with bright magenta I think, etc.
Their purpose is to provide palettes for modders.
Original Xcom palettes are in the "not SAFE" files, taken directly from original Xcom resources (palette files and the executable). Of course they are converted to 255/xFF, since the originals were 63/x3F (see
https://www.ufopaedia.org/index.php/PALETTES.DAT for explanation).
The SAFE versions were created by me.