Matching, search and intermediation with two-sided heterogeneity