Identification in a model of sorting with social externalities and the causes of urban segregation