Heat butter in a deep 12-inch heavy skillet over moderate heat until foam subsides, then cook onions, stirring occasionally, until golden in patches, about 8 minutes. Add sugar, salt, cloves, and enough water to cover onions and simmer, covered, until onions are tender but not falling apart, 25 to 30 minutes. Boil onions, uncovered, until liquid is reduced to about 1/2 cup, about 20 minutes more.