Dallas police exchanged gunfire with a suspect in a parking garage after five officers were shot dead during a street protest against police violence.