Lawmakers narrowly repealed Obama-era rules that made it easier to create state-run plans for private-sector workers.