The Prince of Wales was welcomed to Rio de Janeiro with an honour reserved for the carnival king – the keys to the city.