Inequality and discrimination in historical and modern labor markets