Athletes and spectators from around the world gathered for the Olympics closing ceremony in Rio on Sunday to watch the city pass the baton on to Toyko for the next games.