Stanford president to resign