Electronic and atomistic structures of clean and reduced ceria surfaces