When Detroit became the biggest city in U.S. history to file for bankruptcy last month, it turned public attention to the municipal-bond market, where cities and states go to borrow money. Was this sleepy, often-overlooked area of the financial world actually dangerous?