The Obvious Solution
It's really simple. Guantanamo would no longer be needed if the American justice system could be fixed, so that while the rights of the accused are safeguarded, people who can clearly be proven to have committed serious crimes will not - ever - be turned loose because of technicalities irrelevant to their actual guilt or innocence.
If you rape, if you murder, you will pay the penalty - and if some police officer along the way made a mistake, he may face charges, but that's not going to lead to your victim being denied his or her right to justice.
Once that is done, Guantanamo won't be needed. Until then, as terrorists can cause too many deaths with one blow, we can't chance their being turned loose by a legal system which has lost touch with common sense, reality, and public safety.