Stellar Evolution in NGC 6791: Mass Loss on the Red Giant Branch and the Formation of Low-Mass White Dwarfs