A 14-year-old schoolgirl who campaigned for girls’ education in north-west Pakistan has been shot and wounded on her way from school.