A former detainee of the U.S. military prison at Guantanamo who later rejoined al-Qaida in Yemen has turned himself in to Saudi authorities .