Add thermodynamic potentials

Not ready to be merged. Opening for comments/suggestions.
It's not part of the Gibbs calculation, but it is part of calculating heat capacities, gruneisen parameters, etc, which are needed for K_S, which is needed for seismic waves.