A US judge has prevented the deportation of Indian researcher Badar Khan Suri, who was detained over alleged ties to Hamas.