Wage Competition with Heterogeneous Workers and Firms