Police at the University of Chicago have cleared an anti-war encampment where hundreds gathered in solidarity with Palestinians in Gaza.