Overlapping Portfolios, Contagion, and Financial Stability