Policy makers are working behind the scenes to come up with a way to let states declare bankruptcy and get out from under crushing debts, including the pensions they have promised to retired public workers.