John Kenneth Galbraith , the iconoclastic economist , teacher and diplomat and an unapologetically liberal member of the political and academic establishment that he needled in prolific writings for more than half a century , died yesterday at a hospital in Cambridge , Mass . .