The turmoil shows the profound challenges facing governments stuck between unhappy citizens and wary bond investors.