Federal officials have announced an end to an immigration crackdown in Minnesota that led to mass detentions, protests and two deaths.