High court upholds Gitmo detainees' habeas corpus rights