A 16-year-old opened fire at a high school in the southern Philippines, killing two 14-year-old students and injuring eight others before taking his own life.