Officers were targeted as protesters brought Melbourne traffic to a standstill after circling the city for hours.