After a quarter-century of near-paralysis, American legislators are close to agreeing on reforms that would allow 11 million undocumented migrants to earn citizenship. The proposed changes also would make the US a magnet for talent and creativity from around the world.