Global energy budgets and ‘Trenberth diagrams’ for the climates of terrestrial and gas giant planets