Advanced Evolution of Population II Stars. I. Red Giants and the Helium Flash