Density-Functional Theory for f-Electron Systems: The alpha-gamma Phase Transition in Cerium