If left unchanged, the country’s first law regulating the naturalization of foreign-born Americans would have made it illegal for nearly all of today’s immigrants to become American citizens. Here’s how that changed.