Segregation and income inequality in cities