US repatriates Guantanamo prisoner back to Afghanistan after court ruled he was detained unlawfully