The head of the Qualifications and Curriculum Authority (QCA) has resigned just days before an inquiry into the Sats fiasco is due.