Stav dette: Essays on financial frictions, collateral and default