At least 37 students are missing after suspected Islamist militants stormed a secondary school in northeastern Nigeria while pupils were sitting their final exams.