Equilibrium Sorting Models