When times are good, people are happy to ignore politics, but, as the unrest in Sao Paulo and Istanbul attests, things can change dramatically