The anatomy of sovereign debt crises: Lessons from the American state defaults of the 1840s