Democrats spent big to take control of state legislatures but lost their key targets. Now they’ll be on the sidelines as new maps are drawn.