Collateral, heterogeneity in risk attitude and the credit market equilibrium