At least 18 people, including 17 children and a teacher, have been killed after a school roof collapsed in Pakistan.