U.S. judge orders release of mentally ill Guantanamo prisoner