NSW Premier Iemma quits, replaced by Rees