Sorting in a General Equilibrium On-the-Job Search Model