Valence-Alternation Model for Localized Gap States in Lone-Pair Semiconductors