After several years of administrative turmoil, Foster High School has been posting gains in its math scores and graduation rates. Last year, its calculus students outscored their peers across the nation on the Advanced Placement Exam. The school’s graduation rate improved dramatically, although it still lags the state average of 77 percent.