Nemat Shafik is the third Ivy League president to leave her job after facing intense criticism over her handling of pro-Palestinian protests on campus in the spring.