Ensemble v-representable ab-initio density-functional calculation of energy and spin in atoms: a test of exchange-correlation approximations.