A roof collapse that killed 32 children and a teacher in northwest Pakistan has prompted safety inspections of schools across the region.