How did the factory system and industrialization shape gender roles for Europeans and American in the 19th century?