A 23-year-old man accused of raping and murdering a 17-year-old schoolgirl was shot dead by police during a crime scene reconstruction.