A federal judge has blocked a decision by the Trump administration seeking to deny bond hearings to asylum seekers.