A US university president has quit after her comments about antisemitism on campus during a Congressional hearing triggered a major backlash.