Collateral constraints, capital specificity and the distribution of production: the role of real and financial frictions in aggregate fluctuations