A gunman opened fire on detainees at a Dallas immigration facility, killing one and wounding two before committing suicide on a nearby rooftop.