The queen spoke of the sense of community in London and Manchester after the capital's devastating Grenfell Tower fire and the militant attacks in both cities.