Successive UK governments gagged the media over a leak that put thousands at risk of Taliban reprisals