Julius Robert Mayer and the principle of energy conservation