A Theory of Repurchase Agreements, Collateral Re-Use, and Repo Intermediation