Appeals panel says only military tribunals may assess court-martial convictions in blow to former Afghan war prisoner.