Financial Intermediation, Heterogeneous Investors, and Asset Pricing