Homes, businesses and cars were attacked and 17 police officers were injured during violence in Ballymena and several other areas.