Thermodynamics of Organic Transformations in Hydrothermal Fluids