Affinity thermal machines and metallic salt-ammonia-ammoniates systems