Universal Behavior of the Equilibrium Crystal Shape near the Facet Edge. I. A Generalized Terrace-Step-Kink Model