Human Rights Watch has warned that thousands of detainees transferred to Iraq face a serious risk of abuse and unfair trials.