Phenomenology of ESR in heavy-fermion systems: Fermi-liquid and non-Fermi-liquid regimes