A revised thermodynamic model for crystal surfaces. I. Theoretical aspects