Thermally induced interconversions of metal-pyrimidine-4,6-dicarboxylate polymers: A structural, spectroscopic, and magnetic study