The gunman who opened fire on an Immigration and Customs Enforcement facility in Dallas, killing a detainee and critically wounding two others, left behind a note saying that he hoped the attack would “give ICE agents real terror,” the FBI director said Thursday.