At least 10 students are killed after an explosion at a religious school in northern Aghanistan, officials say.