Recovering rare earths from fluorescent and energy-saving lamps