I was commenting on the misleading wording of cmdkeen's comment, not disputing the legal basis under which Miranda was detained.
But since you asked...
"You are attempting to board a plane in the UK, and the same tests apply to a simple change of flight as they do to passenger flying from the UK."
Agreed. Transit passengers are subject to UK law. An important issue, though, is whether Miranda had actually committed any offence in UK law. Since he was ultimately released, it seems reasonable to assume that the police felt they couldn't establish that he had. Nevertheless, the judges in the present case found that the detention was a lawful means for the police to try to determine whether an offence had been committed. This seems reasonable to me, even though I'm sympathetic towards what Snowden/Greenwald/Miranda/Poitras have done to date.
"Out of interest, if he had in fact stolen them from the UK (in the same way Snowdon did) would you object to his being stopped? What if it were Snowdon himself on his way to Russia?"
First question: No, I wouldn't object. He could have committed a crime, even though I might argue that it was in the public interest. Second question: Depends on whether a crime had been committed by Snowden in the UK (unlikely, imo), or whether the UK had accepted a US warrant for his arrest (which they almost certainly would).
Declassifying the documents just because they had been leaked would be absurd.