The headmaster at the nation's oldest public school resigned. She faced mounting pressure over how she managed racial incidents.