State laying groundwork for managed bankruptcy for Detroit