Late Monday night, peaceful protests devolved into sporadic violence, including gunshots, by what the authorities said was a small number of people, and demonstrators were met with tear gas and orders to leave. Two men were shot in the crowd, officials said in an early-morning news conference, and 31 people — some from New York and California — were arrested. Fires were reported in two places. The police were shot at, the authorities said, but did not fire their weapons.