Bed space was so hard to come by inside immigrant detention facilities across the country last fall that federal officials scrambled to rent out extra room in county prisons and jails. Immigration and Customs Enforcement, the Department of Homeland Security’s immigration-enforcement arm, had thousands more immigrants in custody than it had the capacity to detain.