Interior-surface-atmosphere interactions of rocky planets: simulation of volcanic outgassing and volatile chemical speciation in the C-O-H system